
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Download and install Visual Studio Code for your operating system, then open the JavaScript course folder. Use Visual Studio Code for all future JavaScript MasterClass lessons.
Dive into a hands-on JavaScript masterclass that teaches you to write code, build interactive UI in the browser, and master a language that runs directly in web pages.
Create an index.html with HTML5 boilerplate, insert a script tag to run JavaScript, and understand inline versus external scripts with alert demos.
Discover the three core tenets of JavaScript code structuring: statements as building blocks, the role of semicolons, and comments that explain what and why as programs grow in complexity.
Explore statements in JavaScript, practice using alerts, and learn how semicolons influence execution and readability for neatly structured code.
Understand how semicolons mark the end of a statement in JavaScript and why omitting them can break code, with the reminder to place semicolons for safety.
Learn how to write single-line and multi-line comments in JavaScript to describe what the code does and why, use hotkeys to toggle them, and know they don't affect production.
Learn how to apply use strict to run modern JavaScript, enable ES5 modifications, and how classes and modules may remove the need for the directive.
Learn how to declare and use variables in JavaScript with let, compare let versus var, and store data like cart items and messages for clearer, modern scripting.
Discover how variables act as storage for data and enable reassignments in JavaScript. See how values change from hello to world and learn why redeclaring block scoped variables causes errors.
Explore JavaScript variable naming rules, including allowed characters, first character restrictions, and camel case usage, with examples using dollar and underscore prefixes and common invalid names.
Declare constants with const to create unchanging variables that cannot be reassigned, triggering errors. They can be known prior to execution or calculated at runtime, in uppercase underscores like color_red.
Choose clear, meaningful variable names that describe the data they store. Well-labeled variables reveal whether code was written by a beginner or an experienced developer; spend time thinking before declaring.
Explore eight data types in JavaScript MasterClass, including seven primitives and non primitive, with numbers, big integers, strings, booleans, null, undefined, and symbols, and how variables must have a type.
Explore the numbers data type in JavaScript, including integers and floating point values, plus operations like addition and division. Learn about Infinity, negative Infinity, NaN, and how NaN stays NaN.
Explore the big int data type in JavaScript for numbers bigger than seven or smaller than negative seven. Note that they are rarely used, but they are good to know.
Explore the string data type in JavaScript, including double, single, and backtick quotes. Learn how backticks enable embedding variables and expressions, and note that destructuring works only with backticks.
Explore the booleans data type, representing true or false values for yes or no decisions, with examples like name field checked true and other fields false.
Explore the null value in JavaScript, where a variable can be null to represent nothing or unknown values, distinct from a non-existing object pointer.
Explore the undefined data type for unassigned values in JavaScript; a standalone type with a single value that denotes a variable has not been assigned yet.
Explore symbols as a new ES6 primitive type with immutable, unique identifiers for objects, and see how objects are collections of properties and key value pairs.
Explore JavaScript interactions with alert, prompt, and confirm to display messages, collect input via a modal prompt with a title and initial value, and yield true or false from confirm.
Learn how the prompt function works in JavaScript, collecting user input with prompt and displaying results with alert. See how a title and optional initial value guide interactivity.
Explore the confirm function in JavaScript by showing a modal with a question and two buttons, then use a boolean result (true for okay, false for cancel) and alert it.
Learn how JavaScript converts types, focusing on string, number, and boolean conversions, with practical examples of converting a boolean to a string using typeOf and alert.
Learn how numeric conversions occur automatically in JavaScript during math operations, see explicit conversion with the Number() function, and verify types using alerts to distinguish string and number.
Learn how boolean conversions in JavaScript treat empty values such as zero, empty string, undefined, and NaN as false, and other values as true.
Learn how JavaScript's six core operators work on numbers—addition, subtraction, multiplication, division, remainder, and exponentiation—and see practical examples like two to the power of five and ten divided by two.
Learn how the plus operator concatenates strings in JavaScript, including mixing strings with numbers and the whole expression becoming a string.
Explore how JavaScript comparisons return booleans using greater than, less than, greater than or equals, and not equal.
Explore if else statements in JavaScript using comparisons and prompts, and see how alerts respond. Test with 2015 to see you are right, else you are wrong.
Explore else if in JavaScript by extending if statements to handle multiple conditions, using secondary conditionals to classify a year as early, exactly, or too late.
Explore the question mark syntax to write concise conditional expressions in JavaScript, using a prompt-based age check to determine access when age is greater than 18 and trigger alerts.
Explore the multiple question marks syntax with chained if-else in JavaScript, using age checks (less than three, between 3 and 18, less than 100) and show two conditional forms.
Explore how the or operator in javascript evaluates true and false values, returning true when any operand is true and false only when all operands are false.
Learn how the and operator requires both conditions to be true; evaluate true and true, false and true; short-circuit on the first falsy value.
Explore the not operator in JavaScript, using the exclamation mark to invert booleans, understand true/false outcomes, and how double exclamation marks yield the original value.
Demonstrate how the nullish coalescing operator returns the first defined value when inputs are undefined or null, defaulting to anonymous, and uses a provided name when present.
This JavaScript Fundamentals course is designed to provide you with a solid foundation in JavaScript programming. Whether you're a beginner or have some prior experience, this course will take you through the fundamental concepts and techniques of JavaScript programming.
The course begins with an introduction to the structure of JavaScript code, teaching you how to write clean and organized code that is easy to read and maintain. You will learn about variables and how to declare and assign values to them. We will also cover the importance of using strict mode and how it helps in writing more reliable code.
Next, we dive into the world of data types in JavaScript. You will learn about primitive data types such as strings, numbers, booleans, and the special value "null" and "undefined." We will explore how to work with these data types, perform operations on them, and understand type conversions.
Interaction is a crucial aspect of JavaScript programming, and in this course, we will cover various methods to interact with the user. You will learn how to prompt the user for input, display messages, and handle user interactions through events.
Conditional statements are essential in programming, and JavaScript offers powerful conditional constructs. We will explore if-else statements, allowing you to make decisions based on certain conditions. Additionally, we will cover switch statements, which provide an elegant way to handle multiple possible outcomes.
Functions are the building blocks of JavaScript applications, and in this course, we will dive deep into this topic. You will learn how to define and call functions, pass arguments, and return values. We will also cover function expressions and arrow functions.
By the end of this course, you will have a strong understanding of JavaScript fundamentals. You will be able to write well-structured code, declare and manipulate variables, use conditional statements effectively, and create reusable functions. Whether you're interested in web development, game development, or any other JavaScript-based project, this course will provide you with the necessary skills to get started.