Unit 1. Variables and strings

One of the most familiar statements in JavaScript is the var statement. But the addition of let and const means that var will soon be used much less. The var statement isn’t going away, and can still be used, but most programmers will soon opt to use const to declare variables anytime they don’t need to be reassigned and let anytime they do. In the first two lessons in this unit, you’ll discover why that is.

The following two lessons will cover new string methods and a new type of string called a template. Templates are handy and will make the old, tedious task of concatenating large strings at author-time (at the time the code is being written) a thing of the past. Templates also have a less-known feature called ...

Get Get Programming with JavaScript Next now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.