The purpose of this book provide an overview the Javascript Programing Language
JavaScript is the programming language of HTML and the Web. W3schools Tutorial JavaScript is easy to learn programing language. In this tutorial will show some examples of JavaScript Programing Language from basic to advanced level. I have divided some topics:
JavaScript is the world's most popular programming language and JavaScript is easy to learn. JavaScript is the programming language of the Web.
Alongside HTML and CSS, JavaScript is one of the core technologies of the World Wide Web. JavaScript enables interactive web pages and is an essential part of web applications. The vast majority of websites use it for client-side page behavior, and all major web browsers have a dedicated JavaScript engine to execute it.
Before 2015, we are using the var keyword was the only way to declare a JavaScript variable.
but after the 2015 version of JavaScript (ES6 - ECMAScript 2015) allows the use of the const keyword to define a variable that cannot be reassigned, and the let keyword to define a variable with restricted scope.
In this example, x, y, and z, are variables, declared with the var keyword:
After the version 2015
JavaScript strings are used for storing and manipulating text values.
You can use single or double quotes for defination value
An array is a special variable, which can hold more than one value at a time.
If you have a list of items (a list of car names, for example), storing the cars in single variables could look like this:
Loops are handy, if you want to run the same code over and over again, each time with a different value. Often this is the case when working with arrays:
This is how it works:
The switch expression is evaluated once.
The value of the expression is compared with the values of each case.
If there is a match, the associated block of code is executed.If there is no match, the default code block is executed.
When JavaScript reaches a break keyword, it breaks out of the switch block (Exit of block)
A JavaScript function is defined with the function keyword, followed by a name, followed by parentheses ().
Function names can contain letters, digits, underscores, and dollar signs (same rules as variables).
The parentheses may include parameter names separated by commas: (parameter1, parameter2, ...)
Objects are very important programign in JS.
In JavaScript, almost "everything" is an object like
Booleans, Strings, Dates, Functions ,Arrays , ..etc.
I have explaned and compare Json to XML. If you want to read this post please clikck this link:
Json is a format transporting datas. Json is usually used when datas are sent from server to web site.
JSON = JavaScript Object Notation JSON is a lightweight data interchange format
JSON VALUES:
With the object model, JavaScript gets all the power it needs to create dynamic HTML:
JavaScript can change all the HTML elements in the page
JavaScript can change all the HTML attributes in the page
JavaScript can change all the CSS styles in the page
JavaScript can remove existing HTML elements and attributes
JavaScript can add new HTML elements and attributes
JavaScript can react to all existing HTML events in the page
JavaScript can create new HTML events in the page