What is the value of the boolean variable canVote at the end of this program?

JavaScript Control Structures Quiz Unit 5 Test A

Quiz
•
Computers
•
11th Grade
•
Hard
Joseph Armanious
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
True
False
Yes
none, there is a syntax error in this code
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of this program? var number = 5; var greater_than_zero = number > 0; if (greater_than_zero){ println(number); }
0
5
True
Nothing will print
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of this program?
0
5
True
Nothing will print
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is printed by the following program? var isRaining = false; var isCloudy = false; var isSunny = !isRaining && !isCloudy; var isSummer = false; var isWarm = isSunny || isSummer; println("Is it warm: " + isWarm);
Is it warm: true
Is it warm: false
Is it warm: yes
Is it warm: no
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is printed by the following program? var numApples = 10; var numOranges = 5; if(numApples < 20 || numOranges == numApples){ println("Hello, we are open!"); } else { println("Sorry, we are closed!"); } println("Sincerely, the grocery store");
Hello, we are open!
Sorry, we are closed!
Sincerely, the grocery store
Hello, we are open! Sincerely, the grocery store
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following program print when run? var above16 = true; var hasPermit = true; var passedTest = false; if (above16 && hasPermit && passedTest){ println("Issue Driver's License"); } else { if (above16 || hasPermit || passedTest) { println("Almost eligible for Driver's License"); } else { println("No requirements met."); } }
Issue Driver’s License
Almost eligible for Driver’s License
No requirements met.
Nothing will print
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code? printIn(4); } if (numberOne != numberTwo) { printIn(5); }
1
1 3 5
1 4
1 4 5
Create a free account and access millions of resources
Similar Resources on Quizizz
15 questions
CodeHS Functions and Control Variables

Quiz
•
9th - 12th Grade
20 questions
Intro to JavaScript

Quiz
•
9th - 12th Grade
15 questions
Functions and Parameters Quiz

Quiz
•
9th - 12th Grade
20 questions
Basic JavaScript Review

Quiz
•
9th - 12th Grade
16 questions
Loops

Quiz
•
5th - 12th Grade
20 questions
Unit 5 Quiz - Loops & Lists (code.org)

Quiz
•
10th - 12th Grade
20 questions
APCSA Arrays

Quiz
•
9th - 12th Grade
16 questions
Loops Quiz

Quiz
•
9th - 12th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University