DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Roshan Shambharkar
Roshan Shambharkar

Posted on

Some Shocking facts About JavaScript πŸ’»β˜•

fact 1. JavaScript Was Originally named mocha, But after some time it is used to called Live Script and some period of time people start calling javascript.

Fact 2. JavaScript Was created in 10 Days.

Fact 3. Function can call Themselves, In javaScript function call themselves
for e.g

(function() {
 console.log("I am a function");
})(); // I am a function
Enter fullscreen mode Exit fullscreen mode

Wrap Function between () and immediately call it with empty bracket (). they called as IIFE it means Immediately Invoked Function Expression

Facts 4. ; In JavaScript You can write a Program Using semicolon;

In JavaScript, You can use semicolon in the startas well as at the end of the statement but it is not recommended but you can use it try it and let me know in comments section

Fact 5. Undefined is not a reserved

Undefined is not reserved word in javascript, because it has very special meaning and by using undefined you can determine a variable is undefined it is only way to defined variable is undefined and you can use it as identifier.

var undefined = "I am undefined";
console.log(undefined);
//I am undefined
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Classic DEV Post:

Understanding git through images