
Printing and Variables in JavaScript
Authored by Daniel Clark
Computers
9th - 12th Grade
Used 7+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What keyword do you need to use to define a variable in JavaScript?
variable
var
int
x
Answer explanation
To define a variable in JavaScript, you need to use the keyword 'var'. It is used to declare a variable and assign a value to it.
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the proper function to call to print to the screen?
write
println
post
Answer explanation
The proper function to call to print to the screen is 'println'. It is used to print a line of text and automatically adds a new line character at the end.
3.
MULTIPLE SELECT QUESTION
1 min • 1 pt
Which of the following are types of variables? Select all that applies.
String
Floats
Integers
Boolean
Answer explanation
Variables can be of different types such as String, Floats, Integers, and Boolean. These types represent different kinds of data that can be stored and manipulated in a program.
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Mayri inputs the following println("My name is Mayri"); What will be printed/displayed?
My name is Mayri
"My name is Mayri"
"My name is Mayri."
My name is Mayri.
Answer explanation
The correct answer is My name is Mayri because the println function will display the exact string that is passed as an argument.
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Juan made the following variable ... var costOfApples = 3.6; What type of variable did he make?
String
Boolean
Float
Integer
Answer explanation
Juan made a float variable because the value assigned to costOfApples includes a decimal point.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Review Quiz #2- Productivity Tools
Quiz
•
11th - 12th Grade
10 questions
Anime
Quiz
•
KG - University
10 questions
“Классная” работа с динамической памятью
Quiz
•
9th Grade
10 questions
QBASIC Programming
Quiz
•
5th - 10th Grade
10 questions
Digital Footprint
Quiz
•
9th Grade
10 questions
TQ - Review Quiz Week 1
Quiz
•
9th Grade
10 questions
TIK Kelas X
Quiz
•
10th Grade
10 questions
Movie maker برنامج
Quiz
•
10th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade