Basic JavaScript Concepts

Quiz
•
Computers
•
University
•
Hard
Samten Wangmo
Used 9+ times
FREE Resource
24 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of an if statement in JavaScript?
a) To execute code repeatedly
b) To check if a condition is true or false
c) To declare variables
d) To stop a loop
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a template literal in JavaScript?
a) 'Hello'
b) "Hello"
c) `Hello`
d) {{Hello}}
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of a loop in JavaScript?
a) To declare a variable
b) To execute a block of code repeatedly
c) To define a function
d) To stop execution
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following code output?
a) 5
b) 5 6
c) 0
d) Error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is NOT a feature of template literals?
a) Multi-line strings
b) Variable interpolation
c) Embedding expressions
d) Implicit type conversion
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the difference between a while loop and a do...while loop?
a) while loop executes the block at least once
b) do...while checks the condition before executing the block
c) do...while checks the condition after executing the block
d) There is no difference
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following operators is used to combine multiple conditions in an if statement?
a) &&
b) ||
c) &
d) Both a and b
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Bài tập tổng hợp 1_K3

Quiz
•
3rd Grade - University
25 questions
Final Exam Revision (Trial)

Quiz
•
University
20 questions
QUIZ-1 PTIK

Quiz
•
University
20 questions
KJDSI PERT 9

Quiz
•
University
20 questions
SQL QUIZ -20 Q

Quiz
•
University
25 questions
C Programing

Quiz
•
University
20 questions
Recap C++

Quiz
•
University
20 questions
Control Structures C#

Quiz
•
University
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
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University