📄️ What is JavaScript
JavaScript began as a client-side scripting language that ran in browsers to make sites interactive. With the release of Node.js in 2009, JavaScript ran on servers and full-stack JavaScript development gained traction. Modern JavaScript includes working with databases, building user interfaces, and writing server-side code.
📄️ Data Types
JavaScript types fall in two categories: primitive types and object types.
📄️ Strings
In JavaScript, strings are a primitive data type used to represent textual data. They are sequences of characters,
📄️ Equality and Conditional operators
Equality operators
📄️ Just JavaScript
JavaScript supports conditionals, loops and statements like other high-level languages. JavaScript supports familiar constructs including:
📄️ Objects
In JavaScript, an object is an unordered collection of key-value pairs. Each key-value pair is called a property.
📄️ Functions
Functions are the fundamental building blocks of JavaScript programs. Functions encapsulate code designed to perform specific tasks. They are defined once but may be executed any number of times. JavaScript functions may have parameters and may compute a return value. If there is a return value, this becomes the value of the function-invocation expression. If the return is omitted, undefined is returned.
📄️ Arrays
Arrays are a fundamental datatype in JavaScript. Like arrays in other languages, they represent an ordered collection of values, where each element has a numeric position in the array. Numbering begins at zero. Unlike other languages, JavaScript arrays are not typed; elements of the same array may be of different types. JavaScript arrays are also dynamic - the size can grow and shrink during execution so there is no need to declare a size up front.
📄️ The Document Object Model
A key object in client-side JavaScript is the Document object. The document object represents the HTML document displayed in a browser. The API for manipulating HTML documents is known as the Document Object Model - aka the DOM. The DOM API mirrors the tree structure of an HTML document. For each HTML tag in the document, there is a corresponding element object. For each text element in the document, there is a corresponding Text object.
📄️ Asynchronous JavaScript
Asynchronous programming: