
If else Statement
Authored by Stephanie Ramocan
Computers
6th Grade

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the main use of booleans in an if statement in JavaScript?
As a loop condition
As a condition to execute code
To define a function
To declare a variable
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What must follow the if keyword in an if statement?
A semicolon
A boolean expression in parentheses
A string
A variable name
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens if the condition in an if statement is false?
The program stops
Nothing, the code is not executed
The code inside the curly braces is executed
An error is thrown
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you execute some code if the condition of an if statement is false?
Include an else statement
Declare a new variable
Use a for loop
Use a while loop
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does an else statement in an if-else statement do?
Executes code if the condition is true
Executes code if the condition is false
Checks another condition
Repeats the if statement
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In the example, what message is printed if the 'is heads' variable is true?
It's tails, you lose
Nothing is printed
It's heads, you win
Error
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What variable is used to determine if a user is logged in or not?
is heads
user status
login
logged in
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
11 questions
Technology Morning Tea Quiz
Quiz
•
KG - Professional Dev...
11 questions
AREA OF A CIRCLE
Quiz
•
6th Grade
10 questions
Cloud Computing
Quiz
•
6th Grade
14 questions
Robots and sensors G6
Quiz
•
5th - 7th Grade
10 questions
Youtubers Charlie.C-J
Quiz
•
3rd - 9th Grade
10 questions
mouse
Quiz
•
1st - 8th Grade
10 questions
Computer Lab Rules & Behaviors
Quiz
•
6th - 8th Grade
15 questions
Exploring MS Word and Word 365
Quiz
•
6th 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
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th 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