Javascript Introductions(ES6)

Brief History

Before, when a website need some functionality, it rely on web server which the web server then return the webpage with new data. So netscape came about the idea of wanting functionality not relying on web server. So they contacted "Bredan Eich" which he was able to create JS in just 10 days. It was first known as "Livescript" and they microsoft reverser engineer the program and name it "Jscript". This differences create confuses then the european standardize the language and name it "ECMASCRIPT"(European Computer Manufacturers Association Script).

Website Without Javascript

There will be no functionality on a website without "JS" For example: We can search for "Javascript" in chrome browser then under content, click "javascript" to enable it or not. If not allowed, it'll make website not function just normal static website will be render without any functionality. It even make us have ad-free website.

Why Called Javascript?

Well, the script is same has assigning a role and functionality just as use in a play for an actor to do some specific task. In web development, the script is "Javascript" and the actor is the "HTML ELEMENT". E.g: one actor can be "h1" while the other can be "p" element.

Visualize Javascript

Unhide h1
1second delay
Unhide p
"h1" change text to "Hello"
"p" change text to "World"

This result to:
h1 => Hello
p => World

In this case, we've simply instruct our element or players what should be done. This is way that the scripting language works.

Javascript is an interpreted language. Other interpreted languages includes: Python, Ruby e.t.c We also have compiled languages which involves: Java, C/C++, Swift.

Javascript is supported across major browsers. Although, other language can be compiled to javascript and execute on the browser.

Javascript alert(Adding behavior)

We'll be using chrome as our script writer environment.

Javascript Valid Keywords

There are some proper keywords that javascript accept, we have to provide these proper keywords for it to function as we want. We can learn some of these keywords simply by visiting documented site like MDN DOCS . Here we can get acquainted with various valid "js" keyword and we can as well search for them. E.g we can search "alert" which will bring the details usage of it. By this, we'll be able to see the full version of the "alert" which is "window.alert".

Data Types

JavaScript Variables

Variables is highly important in programming, without it our data will be lost. Let's take for an example by using another "js" keyword which is "prompt".