
JavaScript Basics Quiz
Quiz
•
Other
•
University
•
Practice Problem
•
Medium
elementas undefined
Used 1+ times
FREE Resource
Enhance your content in a minute
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to declare a variable in JavaScript using var?
variable num = 10;
var num = 10;
int num = 10;
let num = 10;
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is NOT a valid JavaScript variable name?
var myVar;
var _myVar;
var 123var;
var $myVar;
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct syntax to assign a value to a variable?
var x; x == 10;
var x = 10;
var x <- 10;
x := 10;
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? var car = "Tesla"; console.log(car);
Tesla
undefined
null
car
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a correct way to declare a variable in JavaScript?
var 1name = "John";
var name1 = "John";
var #name = "John";
var name-1 = "John";
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? var num; console.log(num);
undefined
null
0
Error
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the var keyword in JavaScript?
To declare a function
To declare a variable
To define a loop
To print output
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
20 questions
Type Conversions and Computation
Quiz
•
University
23 questions
INTERNET OF THINGS
Quiz
•
University
20 questions
Kuis Administrasi Jaringan
Quiz
•
University
20 questions
8. Sales and Credit Transactions
Quiz
•
University
20 questions
Social Media + Content Marketing
Quiz
•
University
20 questions
Security Analysis and Portfolio Management
Quiz
•
University
20 questions
ĐẤU TRƯỜNG HYQUIZZ MÙA 2 - NGÀY 23/4
Quiz
•
University
20 questions
5th Grade Q1 Exam
Quiz
•
5th Grade - University
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
Discover more resources for Other
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
5 questions
Poetry Interpretation
Interactive video
•
4th Grade - University
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
15 questions
Review1
Quiz
•
University
15 questions
Pre1
Quiz
•
University
