JavaScript: Core Concepts
76 cards · 🇺🇸 English
Core JavaScript language fundamentals.
Study all 76 cards for free
Flashcards, quizzes, pixel-art games and a daily review that remembers for you.
Try the first 10 cards
1 / 10Seven primitive types in JavaScript
Tap the card for the answer · swipe right if you knew it, left if not
Already have an account? Sign in
Cards
- 1Seven primitive types in JavaScriptNumber, BigInt, String, Boolean, Symbol, Undefined, Null
- 2Number type in JavaScriptIEEE 754 64-bit double-precision floating point value (no distinction between int and float)
- 3BigIntArbitrarily large integers (specified with an 'n' suffix: 100n)
- 4Result of 3 / 2 in JavaScript1.5 (not 1, unlike some languages)
- 5NaNNot a Number - returned from invalid math operations. NaN is contagious: any operation with NaN returns NaN
- 6Is NaN equal to itself?No, NaN is the only value in JavaScript that's not equal to itself (per IEEE 754)
- 7Dividing by zeroInfinity (positive or negative)
- 8Are strings in JavaScript Unicode?Yes, they are UTF-16 encoded sequences of Unicode characters
- 9Can strings use single or double quotes?Both work - JavaScript does not distinguish between characters and strings
- 10Template literals in JavaScriptStrings with embedded expressions using backticks: `I am ${age} years old.`
- 11NullA deliberate non-value (only accessible through the null keyword)
- 12UndefinedAbsence of value (e.g., uninitialized variables, nonexistent properties, return with no value)
- 13What values are falsy in JavaScript?false, 0, empty strings (''), NaN, null, and undefined
- 14Three keywords to declare variableslet, const, and var
- 15LetDeclaring block-level variables (available from the block they're enclosed in)
- 16ConstDeclaring variables whose values are never intended to change (block-scoped, cannot be reassigned)
- 17Does const prevent mutations?No, it only prevents reassignments. For objects: obj.a = 1 is allowed even if obj is const
- 18Why is var discouraged?It has surprising behaviors (e.g., not block-scoped) and is discouraged in modern JavaScript
- 19Value of an uninitialized variableundefined
- 20Temporal dead zoneThe region where let/const variables occupy the scope but cannot be accessed before declaration
- 21Is JavaScript statically or dynamically typed?Dynamically typed - types are associated with values, not variables
- 22+ operatorString concatenation - when one operand is a string, everything is converted to string first
- 23'3' + 4 + 5'345' (string concatenation from left to right)
- 24== vs ===== performs type coercion, === (strict equality) does not. === is usually preferred
- 25123 == '123'true (type coercion)
- 26Are && and || short-circuit operators?Yes - they evaluate left to right and stop as soon as the outcome is determined
- 270 && 'Hello'0 (first falsy value)
- 28'Hello' || 'world''Hello' (first truthy value)
- 29Walrus operator in JavaScript:= - allows assignment inside expressions
- 30Are semicolons required in JavaScript?Optional - JavaScript automatically inserts them (ASI), but there are caveats
And 46 more cards. Study the whole deck free
Articles about this deck
More Programming decks
See all- 🌐
APIs: REST, GraphQL & HTTP Status Codes
108 cards · 🇺🇸 English
REST and GraphQL API concepts plus common HTTP status codes.
- 🎨
CSS: Box-Modell, Selektoren & Media Queries
129 cards · 🇺🇸 English
Das CSS-Box-Modell, Selektortypen, Media Queries und Animationen.
- 📄
HTML : balises et attributs
99 cards · 🇺🇸 English
Éléments HTML essentiels et leurs attributs.
- 🎨
CSS: Box Model, Selectors & Media Queries
129 cards · 🇺🇸 English
The CSS box model, selector types, media queries, and animations.
- 🔒
Web Security: OWASP & Authentication
35 cards · 🇺🇸 English
Common web vulnerabilities (OWASP Top 10) and authentication concepts.
- 🎨
CSS : Flexbox et Grid
58 cards · 🇺🇸 English
Mise en page avec CSS Flexbox et Grid.
