Printing and Variables in JavaScript

Quiz
•
Computers
•
9th - 12th Grade
•
Medium
Daniel Clark
Used 7+ times
FREE Resource
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.
Similar Resources on Wayground
7 questions
Topic 6.1 Video 1

Quiz
•
11th Grade
10 questions
Latihan Interface

Quiz
•
9th - 12th Grade
10 questions
Valid and Invalid Variables in Java

Quiz
•
9th Grade
10 questions
PC4.8-PC4.9 CSC403 T2

Quiz
•
9th Grade
9 questions
Java nested if program

Quiz
•
10th - 11th Grade
10 questions
Introduction to PHP: Hypertext Preprocessor

Quiz
•
11th - 12th Grade
5 questions
Java - Writing Methods

Quiz
•
9th - 12th Grade
10 questions
Unit 1 Post Test: Basic Python

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
10 questions
1.2 OSI & TCP IP Models Quiz

Quiz
•
10th Grade
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
30 questions
Introduction to Computers

Quiz
•
8th - 9th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
20 questions
Hardware vs. Software Quiz

Quiz
•
7th - 10th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade