JavaScript Foundations 1

0.0(0)
studied byStudied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/43

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 11:21 PM on 1/27/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

44 Terms

1
New cards
What keyword declares a variable that cannot be reassigned?
const
2
New cards
What keyword declares a variable that can be reassigned?
let
3
New cards
What is the default value of an uninitialized variable declared with let?
undefined
4
New cards
What are the primitive data types in JavaScript?
string number boolean undefined null symbol bigint
5
New cards
What operator is used to check the data type of a value?
typeof
6
New cards
What is the result of typeof null?
object (known JavaScript bug)
7
New cards
What is returned by typeof undefined?
undefined
8
New cards
What is the difference between let and var?
let is block scoped var is function scoped
9
New cards
What is string interpolation in JavaScript?
Embedding expressions inside template literals using ${}
10
New cards
What characters define a template literal?
Backticks
11
New cards
What does the ++ operator do?
Increments a value by 1
12
New cards
What is the difference between == and ===?
=== checks value and type == allows type coercion
13
New cards
What does the > operator return?
A boolean indicating if the left value is greater than the right
14
New cards
What is the result type of a comparison expression?
boolean
15
New cards
What is the ternary operator syntax?
condition ? valueIfTrue : valueIfFalse
16
New cards
When should a ternary operator be used?
For simple conditional expressions
17
New cards
What keyword executes code based on a condition?
if
18
New cards
What happens if an if condition is false and there is no else?
The block is skipped
19
New cards
What does console.log() do?
Outputs values to the console
20
New cards
Is JavaScript compiled or interpreted?
Interpreted with JIT compilation
21
New cards
What does JavaScript running in the browser provide access to?
DOM Web APIs browser environment
22
New cards
What does JavaScript dynamic typing mean?
Variable types are determined at runtime and can change
23
New cards
What are the two main categories of data types in JavaScript?
Primitive types and object types
24
New cards
What happens if you declare a variable without let const or var?
It creates a property on the global object (bad practice)
25
New cards
What does NaN stand for?
Not a Number
26
New cards
What is the result of Number('Jonas')?
NaN
27
New cards
What is type conversion in JavaScript?
Explicitly converting one type to another
28
New cards
What is type coercion in JavaScript?
Automatic type conversion performed by JavaScript
29
New cards
Which operator causes string concatenation through coercion?
The + operator
30
New cards
Which operators convert strings to numbers during coercion?
"- * / >
31
New cards
What are the five falsy values in JavaScript?
0 empty string undefined null NaN
32
New cards
Is an empty object truthy or falsy?
Truthy
33
New cards
Why can checking a variable like if(height) be dangerous?
Because 0 is falsy even when it is a valid value
34
New cards
What logical operator represents AND?
&&
35
New cards
What logical operator represents OR?
||
36
New cards
What logical operator negates a boolean value?
!
37
New cards
What keyword prevents a switch case from falling through?
break
38
New cards
What is the default case in a switch statement?
Code that runs if no case matches
39
New cards
What is an expression in JavaScript?
Code that produces a value
40
New cards
What is a statement in JavaScript?
Code that performs an action but does not produce a value
41
New cards
Can statements be used inside template literals?
No only expressions
42
New cards
What engine runs JavaScript in Chrome?
V8
43
New cards
What allows JavaScript to run outside the browser?
Node.js
44
New cards
What does ES6 refer to?
The 2015 major update to JavaScript