ReadingNotes

JavaScript

JavaScript is an lightweight and interpreted complied programming language with first-class functions. JavaScript is also a protoype-based, multi-paragigm, single-threaded, dynamic language, supporting object-oriented, imperative, and declarative. JavaScript capabilities include: runtime object construction, variable parameter lists, function variables, dynamic script creation, object introspection, and source-code recovery.

Three major parts thats referred as JavaScript

1)The server API provided by Node.js or other server side systems. 2)DOM API- this is how the language interact with the varous parts of a webpage while in the browser. 3)JavaScript itself.

JavaScript Variables

There are 4 ways to declar a Javascript Variable. Using Var Using let Using const Using nothing

what are variables

Variables are containers for storing data values.

When to use Javascript var?

You always declare javascript variables with var, let, and/or const The var keyword has been used in all Javascript code from 1995 up to 2015 The let and const keywords were added to Javascript in 2015. You must use var if you want to run your code in older browsers.

When to use const

ALways declare variables with const if you want a general rule. Example of const const price1 = 5 const price 2= 6 let total = price1 + price2

JavaScript identifiers

Every javascript variable must be identified with unique names or identifiers. Identifiers can be short names like x or y or something more descriptive like age, sum, totalVloume. There are rules for making names for variables. The names have to contain letters,digits, underscores, and dollar signs. Names have to start with a letter Names can also begin with $ and _ Names are case sensitive. (y and Y are different variables) Reserved words like javascript cannot be used as names.

Things i want to know more about

Are java and javascript the same?