Search Header Logo

CS1 - Final Exam Review

Authored by Stephan Moore

Computers

KG - University

Used 9+ times

CS1 - Final Exam Review
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

32 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

What symbol is used to negate a boolean in JavaScript?

NOT
!
~
&

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

After the following code runs, what is the value of b?
var a = true; var b = a || false;

true
false
"b"
"a || false"

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

We want to print “CodeHS is the best” exactly 25 times.What control structure should we use?

break statement
for loop
while loop
if statement

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A store has 20 apples in inventory.How can you store this information in a JavaScript variable?

var numApples == 20;
20 = numApples;
var numApples = 20;
var num apples = 20;

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

We want to flip a coin until we get 3 heads in a row.What kind of loop should we use?

for loop
while loop
loop and a half
infinite loop

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why do we write functions?

Make our code easier to understand 
Avoid writing repeated code
Make our code reusable
All of these

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What kind of statement allows us to run a block code only if a certain condition is true?

if statement
break statement
else statement
for loop

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?