Core JavaScript variable declarations, data types, and operators explained with a short example each.
About this set
38 basic cards for JavaScript JavaScript. Set 2 of 2 in JavaScript Basics. It opens with "What keyword declares a variable with block scope that cannot be reassigned?" and "What keyword declares a variable with block scope that can be reassigned?". More College and University decks are listed below.
38 cards · basic cards · AI-written, checked twice. Edit anything.
- What keyword declares a variable with block scope that cannot be reassigned?
Show answer
const
- What keyword declares a variable with block scope that can be reassigned?
Show answer
let
- What keyword declares a variable with function scope (pre-ES6)?
Show answer
var
- What is the primitive data type for text?
Show answer
string
- What is the primitive data type for whole and decimal numbers?
Show answer
number
- What is the primitive data type with only two values: true or false?
Show answer
boolean
- What is the primitive value that represents the absence of any value?
Show answer
null
- What is the primitive value assigned to variables that have been declared but not initialized?
Show answer
undefined
- What primitive data type represents a unique identifier that cannot be recreated?
Show answer
symbol
- What primitive data type represents integers larger than Number.MAX_SAFE_INTEGER?
Show answer
bigint
- What operator returns a string indicating the type of a value?
Show answer
typeof
- What data structure is an ordered collection accessed by numeric index?
Show answer
array
- What data structure is a collection of key-value pairs?
Show answer
object
- What syntax allows embedding expressions inside a string using backticks?
Show answer
template literals
- How do you join two strings together in JavaScript?
Show answer
Use the + operator or += assignment operator, or template literals with ${}