
Kuizi 12 - Web
Quiz
•
Computers
•
10th Grade
•
Hard
Shkodran Hasani
FREE Resource
Enhance your content
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the syntax for an if statement in JavaScript?
if condition { // code to execute }
if (condition) // code to execute
if (condition) { // code to execute }
if { condition } // code to execute
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you write an if-else statement?
if (condition) { // code } else if { // code }
if condition then { // code } else { // code }
if (condition) { // code to execute if condition is true } else { // code to execute if condition is false }
if (condition) { // code } else { // execute code }
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following code output: if (5 > 3) { console.log('True'); }?
Error
Undefined
False
True
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of a switch statement?
To define a variable's scope
To handle exceptions in programming
To create loops in code
The purpose of a switch statement is to execute different code blocks based on the value of a variable or expression.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you define a default case in a switch statement?
Use 'case default:' to define the default case.
You can omit the default case entirely in a switch statement.
Use 'default:' followed by the code block.
The default case is defined with 'default_case:' syntax.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following switch statement output: switch (2) { case 1: console.log('One'); break; case 2: console.log('Two'); break; }?
Two
One
Zero
Three
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the syntax for a ternary operator?
condition ? result_if_false : result_if_true
result_if_true : condition ? result_if_false
result_if_true ? result_if_false : condition
condition ? result_if_true : result_if_false
Create a free account and access millions of resources
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
20 questions
JAVA FUNDAMENTALS
Quiz
•
9th - 12th Grade
20 questions
Operators (Computer Science - Python)
Quiz
•
7th - 12th Grade
20 questions
Boolean Logic
Quiz
•
9th - 10th Grade
20 questions
JavaScript Basics Test
Quiz
•
10th - 12th Grade
10 questions
Pseudocode - OCR ERL
Quiz
•
9th - 12th Grade
10 questions
Komunikasi Daring 1
Quiz
•
10th Grade
10 questions
if/else statements quiz
Quiz
•
9th Grade - University
10 questions
Python beginners quiz
Quiz
•
9th - 10th Grade
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
20 questions
ELA Advisory Review
Quiz
•
7th Grade
15 questions
Subtracting Integers
Quiz
•
7th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade