General JS Questions

Quiz
•
Computers
•
10th Grade
•
Medium
Arif Ali
Used 8+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does this instruction do?
var pixel = [127, 200, 19];
Sets the color of a pixel
Creates a variable called pixel and assigns an array of 3 values to that variable
Reads the value of a pixel from an image
Nothing, there's an error in it
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does this code do?
pixel = image.getPixel(120,33);
Gets the pixel at coordinates x=120 y=33, from the image and stores it in a variable
Modifies a pixel to have the values Red = 120 and Green = 33
Generates an error since the word "pixel" does not have the word "var" before it.
Prints the value of a pixel on the screen
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does this command do?
z = z - 12;
Adds 12 to the value of z and stores the new value in z
Subtracts 12 from the value of z and stores the new value in z
Checks if the value of z is greater than 12
Generates an error because z cannot be a variable name
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the result of running this code:
Print all the numbers from 0 to 370 each on a separate line
Print all the odd numbers from 0 to 370 each on a separate line
Print all the even numbers from 0 to 370 each on a separate line
Print all the numbers from 0 to 370 each on the same line
5.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
What will be the result of running the code on the left be?
Print the numbers 0 to 99 on separate lines
Print the numbers 0 to 99, each on a separate line
Print the numbers from 0 to 99 backwards, on separate lines.
Print the numbers 0 to 99, ten at a time, moving to the next line after each 10 numbers
Answer explanation
Can you think of a way to make the numbers in the first row line up with the numbers below them?
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What's wrong with this code?
(assume that the url is correct)
Nothing, it'll display the image
The coordinates are wrong, they need to be 0, 0
the word "WebImage" is incorrect. Should be Image
There's a different error.
Answer explanation
Be prepared to discuss this one!
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
This code is part of a students effort to modify an image. What does it look like the student is trying to do?
Brighten the image
Darken the image
Hide an image in another image
Something else
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Bitmapped and Vector Graphics

Quiz
•
10th - 12th Grade
10 questions
Bitmap v Vector Images

Quiz
•
KG - University
12 questions
iGCSE Computer Science: Digital Image Representation

Quiz
•
9th - 12th Grade
11 questions
Digital Imaging

Quiz
•
KG - University
12 questions
Bitmap images (improved)

Quiz
•
9th - 10th Grade
10 questions
Image File Types

Quiz
•
10th - 12th Grade
15 questions
Computer Graphics

Quiz
•
7th - 11th Grade
15 questions
Image Representation

Quiz
•
7th - 10th Grade
Popular Resources on Wayground
55 questions
CHS Student Handbook 25-26

Quiz
•
9th Grade
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
10 questions
Chaffey

Quiz
•
9th - 12th Grade
15 questions
PRIDE

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
22 questions
6-8 Digital Citizenship Review

Quiz
•
6th - 8th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Chaffey

Quiz
•
9th - 12th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Lab Safety and Lab Equipment

Quiz
•
9th - 12th Grade
20 questions
Getting to know YOU icebreaker activity!

Quiz
•
6th - 12th Grade
18 questions
Characteristics of Living Things

Quiz
•
9th - 10th Grade
12 questions
Macromolecules

Lesson
•
9th - 12th Grade