Show tasks
The JavaScript language
An introduction
An Introduction to JavaScript
Manuals and specifications
Code editors
Developer console
JavaScript Fundamentals
Hello, world!
Show an alert
Show an alert with an external script
Code structure
The modern mode, "use strict"
Variables
Working with variables
Giving the right name
Uppercase const?
Data types
String quotes
Interaction: alert, prompt, confirm
A simple page
Type Conversions
Basic operators, maths
The postfix and prefix forms
Assignment result
Type conversions
Fix the addition
Comparisons
Comparisons
Conditional branching: if, '?'
if (a string with zero)
The name of JavaScript
Show the sign
Rewrite 'if' into '?'
Rewrite 'if..else' into '?'
Logical operators
What's the result of OR?
What's the result of OR'ed alerts?
What is the result of AND?
What is the result of AND'ed alerts?
The result of OR AND OR
Check the range between
Check the range outside
A question about "if"
Check the login
Nullish coalescing operator '??'
Loops: while and for
Last loop value
Which values does the while loop show?
Which values get shown by the "for" loop?
Output even numbers in the loop
Replace "for" with "while"
Repeat until the input is correct
Output prime numbers
The "switch" statement
Rewrite the "switch" into an "if"
Rewrite "if" into "switch"
Functions
Is "else" required?
Rewrite the function using '?' or '||'
Function min(a, b)
Function pow(x,n)
Function expressions
Arrow functions, the basics
Rewrite with arrow functions
JavaScript specials
Code quality
Debugging in the browser
Coding Style
Bad style
Comments
Ninja code
Automated testing with Mocha
What's wrong in the test?
Polyfills and transpilers
Objects: the basics
Objects
Hello, object
Check for emptiness
Sum object properties
Multiply numeric property values by 2
Object references and copying
Garbage collection
Object methods, "this"
Using "this" in object literal
Create a calculator
Chaining
Constructor, operator "new"
Two functions – one object
Create new Calculator
Create new Accumulator
Optional chaining '?.'
Symbol type
Object to primitive conversion
Data types
Methods of primitives
Can I add a string property?
Numbers
Sum numbers from the visitor
Why 6.35.toFixed(1) == 6.3?
Repeat until the input is a number
An occasional infinite loop
A random number from min to max
A random integer from min to max
Strings
Uppercase the first character
Check for spam
Truncate the text
Extract the money
Arrays
Is array copied?
Array operations.
Calling in an array context
Sum input numbers
A maximal subarray
Array methods
Translate border-left-width to borderLeftWidth
Filter range
Filter range "in place"
Sort in decreasing order
Copy and sort array
Create an extendable calculator
Map to names
Map to objects
Sort users by age
Shuffle an array
Get average age
Filter unique array members
Create keyed object from array
Iterables
Map and Set
Filter unique array members
Filter anagrams
Iterable keys
WeakMap and WeakSet
Store "unread" flags
Store read dates
Object.keys, values, entries