Variables
20 lessons
- 01Learn JavaScriptAn introduction to JavaScript, the world's most widely-used programming language.
- 02Basic VariablesLearn how to declare basic variables in JavaScript using the legacy `var` keyword and understand common data types.
- 03let and constTransition from `var` to the modern, block-scoped variable declarations using `let` and `const`.
- 04Why JavaScript?Understand the unique position JavaScript holds in the web development ecosystem and its pros and cons.
- 05CommentsLearn how to annotate your JavaScript code using single-line and multi-line comments.
- 06Numbers in JSUnderstand how JavaScript handles numbers, including integers and floating-point values, as a single `Number` type.
- 07Numbers ReviewA quick review of basic mathematical operations using JavaScript's unified `Number` type.
- 08Increment and DecrementLearn shorthand operators for increasing and decreasing numeric values in JavaScript.
- 09Undefined vs. UndeclaredUnderstand the critical difference between a variable that is explicitly undefined and one that has never been declared.
- 10Null vs. UndefinedExplore the subtle differences between `null` and `undefined`, JavaScript's two unique ways of representing nothingness.
- 11Dynamic and Weak TypingDiscover how JavaScript's dynamic and weakly-typed nature allows for flexibility, while also introducing potential type coercion bugs.
- 12Same Line DeclarationsLearn how to declare and initialize multiple variables on a single line to keep your code concise.
- 13JavaScript's SpeedAn overview of how JavaScript's execution speed compares to other languages through Just-In-Time (JIT) compilation.
- 14StringsLearn how to define text data using strings, access individual characters, and determine string length.
- 15Template LiteralsUtilize template literals for advanced string formatting and executing inline JavaScript logic.
- 16Java vs. JavaScriptDispel the common misconception that Java and JavaScript are related languages.
- 17Semi-Colons in JSUnderstand the role of semicolons as statement terminators in JavaScript and best practices for using them.
- 18String EncodingLearn how JavaScript encodes strings using UTF-16 code units and how this impacts string length, especially with emojis.
- 19Camel Case in JSAdopt `camelCase` as the standard naming convention for variables and functions in JavaScript.
- 20Chapter 1 Cheatsheet: Variables & BasicsA quick summary and cheatsheet of all the essential JavaScript variable and syntax concepts covered in Chapter 1.