Control Structures Flashcard

Control Structures Flashcard

Assessment

Flashcard

Computers

8th Grade

Easy

Created by

Aldo Chapa

Used 1+ times

FREE Resource

Student preview

quiz-placeholder

12 questions

Show all answers

1.

FLASHCARD QUESTION

Front

What is the correct way to define a function in JavaScript? Options: function: myFunction() {}, function myFunction() {}, def myFunction() {}, function = myFunction() {}

Back

function myFunction() {}

2.

FLASHCARD QUESTION

Front

Which of the following is a Boolean value in JavaScript? Options: 0, "true", true, `"false"

Back

true

3.

FLASHCARD QUESTION

Front

Which logical operator represents "AND" in JavaScript? Options: &&, ||, !, ==

Back

&&

4.

FLASHCARD QUESTION

Front

What is the result of the following comparison in JavaScript: 10 == "10"?

Back

true

5.

FLASHCARD QUESTION

Front

What will the following code output?
```javascript
let x = 0;
while (x < 3) {
console.log(x);
x++;
}
```

Back

0 1 2

6.

FLASHCARD QUESTION

Front

Which statement is used to exit a loop prematurely in JavaScript?

Back

break

7.

FLASHCARD QUESTION

Front

Which of the following is a valid function call in JavaScript? Options: myFunction;, myFunction[];, myFunction();, myFunction{}

Back

myFunction();

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?