His name is Fred and he is less than 16 years old Options:
1. if (name = "fred" && age < 16 )
2. if (name === "fred" && age < 16 )
3. if (name = "fred" || age < 16 )
4. if (name === "fred" || age < 16 )
CodeHS JavaScript

Flashcard
•
Computers
•
8th - 12th Grade
•
Easy
Casey Cattron
Used 1+ times
FREE Resource
Student preview

21 questions
Show all answers
1.
FLASHCARD QUESTION
Front
Back
if (name === "fred" && age < 16 )
Answer explanation
The correct choice is 'if (name === "fred" && age < 16 )' because '===' checks for both value and type equality, ensuring 'name' is exactly 'fred'. The use of '&&' ensures both conditions must be true.
2.
FLASHCARD QUESTION
Front
Repeat something 10 times Options: repeat 10, repeat { } until 10;, while (i = 10)
Back
for (var i=0; i<10; i++)
Answer explanation
The correct choice, 'for (var i=0; i<10; i++)', uses a loop to repeat an action 10 times. It initializes a counter, checks the condition, and increments the counter, making it suitable for this task.
3.
FLASHCARD QUESTION
Front
What is the symbol used for the INCREMENT operator in JS? Options: +, ++, =, ==
Back
++
Answer explanation
The INCREMENT operator in JavaScript is represented by '++'. It increases the value of a variable by one. The other options, such as '+', '=', and '==', serve different purposes in the language.
4.
FLASHCARD QUESTION
Front
Conditions return values of which data type? Options: Integer, boolean, floating-point, string
Back
boolean
Answer explanation
Conditions evaluate to true or false, making their return type boolean. Other types like integer, floating-point, and string do not represent the outcome of a condition.
5.
FLASHCARD QUESTION
Front
Loops in programming start counting from?
Back
0
Answer explanation
In programming, loops typically start counting from 0. This is known as zero-based indexing, which is common in many programming languages like C, Java, and Python. Therefore, the correct answer is 0.
6.
FLASHCARD QUESTION
Front
What symbol represents the or operator in JavaScript?
Back
||
Answer explanation
In JavaScript, the or operator is represented by the symbol ||
. This operator returns true if at least one of the operands is true, making it distinct from the single pipe |
, which is a bitwise operator.
7.
FLASHCARD QUESTION
Front
Arithmetic Operators
What is ++ ?
Back
increment
Answer explanation
The '++' operator is used in programming to increment a variable's value by one. Therefore, the correct answer is 'increment', as it directly describes the function of this operator.
Create a free account and access millions of resources
Similar Resources on Quizizz
16 questions
Loops Flashcard

Flashcard
•
9th - 12th Grade
13 questions
Interactive Animations and Games from code.org

Flashcard
•
7th - 12th Grade
15 questions
HTML - Flashcard 1

Flashcard
•
9th - 12th Grade
13 questions
Functions and Parameters

Flashcard
•
9th - 12th Grade
18 questions
Unit 4 Variables, Conditionals & Functions CS20-21

Flashcard
•
9th - 12th Grade
20 questions
JavaScript Math

Flashcard
•
9th - 11th Grade
18 questions
Code.org CSP Unit 4 Review (23-24)

Flashcard
•
9th - 12th Grade
14 questions
Lesson 1 Database Basics

Flashcard
•
9th - 11th Grade
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions

Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines

Quiz
•
Professional Development
12 questions
Dividing Fractions

Quiz
•
6th Grade
Discover more resources for Computers
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
25 questions
Spanish preterite verbs (irregular/changed)

Quiz
•
9th - 10th Grade
10 questions
Identify Slope and y-intercept (from equation)

Quiz
•
8th - 9th Grade
10 questions
Juneteenth: History and Significance

Interactive video
•
7th - 12th Grade
15 questions
Volume Prisms, Cylinders, Cones & Spheres

Quiz
•
8th Grade
8 questions
"Keeping the City of Venice Afloat" - STAAR Bootcamp, Day 1

Quiz
•
9th - 12th Grade
26 questions
June 19th

Quiz
•
4th - 9th Grade