JavaScript as a programming language
The evolution of JavaScript from a browser script to a global language.

What is the programming language?
Programming language is just a tool that allows us to write code that will instruct a computer to do something.
What is the JavaScript?
JavaScript is a high level language, which means that we don’t have to think about a lot of complex stuff such managing computer’s memory while it runs the program.
There are a lot of so-called abstractions over all these small details that we don’t want worry about. And this makes the language a lot easier to write and to learn.
It’s Object Oriented(Based on objects for storing most kind of data) and multi-paradigm(Can use different programming styles) language.
Popularity of JavaScript
Dynamic Typing
JavaScript has a feature called dynamic typing. It means when you create a new variable, you don’t have to manually define the data type of the value that it contains.
JavaScript automatically determines the data type of the value when it’s stored into a variable. In JavaScript that value has a type not variable.
type of a value that is hold by a variable.Programming Paradigms in JavaScript
JavaScript supports both imperative and declarative programming styles:
Imperative Programming : Focuses on how to perform tasks by controlling the
flowof computation. This includes approaches likeproceduralandobject-orientedprogramming, often using constructs likeasync/awaitto handle asynchronous actions.Declarative Programming : Focuses on what should be done rather than how it’s done. It emphasizes describing the desired result, such as with
arrow functions, without detailing the steps to achieve it.
Variables
Variable can be said as container / label to contain some value. To store some value in memory, the variable is used for it.
Variables can be declared using
var,let, orconstJavaScript is dynamically typed, so
types of valuesare decided at runtime.You don’t need to specify a data type when creating a variable.
var (function and global scoped), let and const (local scoped).varcan bere-declaredin the same scope, butletandconstcannot be re-declared.
var x = 10;
var x = 20; // Allowed
let y = 30;
let y = 40; // SyntaxError
const z = 50;
const z = 60; // SyntaxError
array or objects even if declared as const. How? Because their reference is saved in stack while value in heap.let name = "JS";
Rules for Naming Variables
When naming variables in JavaScript, follow these rules
Variable names must begin with a
letter (A to Z or a to z),underscore (_), ordollar sign ($).Subsequent (after that) characters can be letters, numbers, underscores, or dollar signs.
Variable names are case-sensitive (e.g.,
ageandAgeare different variables).Reserved keywords (like
function,class,return, etc.) cannot be used as variable names.
Data Types
It’s an attribute (quality) that identifies (recognizes) a piece of data and instructs (tells) a computer system on how to interpret (explain) its value is called a data type.
The data has type (e.g. number, string