Book Image

JavaScript Complete Grandmaster 2023 [Video]

By : SkillZone .
Book Image

JavaScript Complete Grandmaster 2023 [Video]

By: SkillZone .

Overview of this book

JavaScript is the #1 scripting language of the web, where a lot of the dynamic and styled content is handled by JavaScript in the background. But before using this language to create dynamic websites, you need to have a firm grasp of how it works behind the scenes. You will learn “why” things work and not just “how”. Understanding the fundamentals of JavaScript is important as it will allow you to write more complicated code. And trust me, every programming encounters bugs, and without understanding the fundamentals, you will be totally lost. By the end of this course, you will be able to “speak” JavaScript by gaining an understanding of how the browser uses it; what variables, objects, and functions are; what different data types there are; and how to manipulate content on a website. We will dig deeper and create our own dialog methods from scratch. You will learn about the arrow syntax, Math.random() function, looping through objects and arrays, and working with dates. We will look at prototypes, JS Engines, the Execution Stack, and a whole bunch more! Through practical examples, this course helps you understand JavaScript piece by piece. And we will use the latest and best features of JavaScript along the way so you can stay ahead of the pack. All the resources for this course are available at https://github.com/PacktPublishing/Complete-JavaScript-Course
Table of Contents (16 chapters)
Chapter 7
Variables
Content Locked
Section 7
CONST - the New Way to Declare a Constant Variable
Const addresses the need of developers to associate a fixed, or 'constant', name with a given value such that the value cannot be changed. For example, if you are working with math formulas, you may want to create a constant that stores the value of π and e. Constants defined with const follow the same scope rules as those defined with let, but they cannot be redeclared. Constants are also block-scoped instead of function-scoped. Confused? Good. Let us dive in.