
The Modern JavaScript Tutorial
2 days ago · Modern JavaScript Tutorial: simple, but detailed explanations with examples and tasks, including: closures, document and events, object oriented programming and more.
Advanced working with functions - The Modern JavaScript Tutorial
Recursion and stack Rest parameters and spread syntax Variable scope, closure The old "var" Global object Function object, NFE The "new Function" syntax Scheduling: setTimeout and setInterval …
JavaScript Fundamentals
The modern mode, "use strict" Variables Data types Interaction: alert, prompt, confirm Type Conversions Basic operators, maths Comparisons Conditional branching: if, '?' Logical operators Nullish …
Hello, world! - The Modern JavaScript Tutorial
Nov 1, 2021 · These comments hide JavaScript code from old browsers that didn’t know how to process the <script> tag. Since browsers released in the last 15 years don’t have this issue, this kind of …
Currying - The Modern JavaScript Tutorial
Jan 10, 2021 · Let’s see an example first, to better understand what we’re talking about, and then practical applications. We’ll create a helper function curry(f) that performs currying for a two-argument f.
Loops: while and for - The Modern JavaScript Tutorial
Jun 19, 2022 · In practice, the browser provides ways to stop such loops, and in server-side JavaScript, we can kill the process. Any expression or variable can be a loop condition, not just comparisons: the …
The JavaScript language
Here we learn JavaScript, starting from scratch and go on to advanced concepts like OOP. We concentrate on the language itself here, with the minimum of environment-specific notes.
Arrow functions, the basics - The Modern JavaScript Tutorial
Apr 14, 2022 · To study them in-depth, we first need to get to know some other aspects of JavaScript, so we’ll return to arrow functions later in the chapter Arrow functions revisited.
Rest parameters and spread syntax - The Modern JavaScript Tutorial
Oct 18, 2022 · In the examples above we used an array to demonstrate the spread syntax, but any iterable will do. For instance, here we use the spread syntax to turn the string into array of characters:
Functions - The Modern JavaScript Tutorial
Oct 14, 2022 · This example clearly demonstrates one of the main purposes of functions: to avoid code duplication. If we ever need to change the message or the way it is shown, it’s enough to modify the …