What is Javascript?
Javascript is the world's most popular programming language.
It abbreviated as JS
Created to make web pages alive
When it was first created, it named LiveScript and later named JavaScript.
Why JavaScript?
It is a scripting language that is one of the three core languages used to develop websites. Whereas HTML and CSS give a website structure and style, JavaScript makes it functional and interactive.
Also, there is no relation between Java and JavaScript except the name Java. Many say it was also a marketing static to divert some attention from Java, which was the most popular language at the time.
How it works?
It can run on the browser, server, or any device that has a special program called the JavaScript engine .
Different browsers have their own engine to run javascript called “JavaScript virtual machine”.
Chrome & Opera: V8
FireFox: SpiderMonkey
Safari: Nitro and SquirrelFish
How the Engine works?
- First engine reads the script
- Then it converts/compiles to machine-readable code without any transformation.
- Then machine code runs very fast
You can check more How JavaScript Works by Alexander Zlatkov
Namastey Javascript 🙏
JavaScript programs can be inserted almost anywhere into an HTML document using the <script>
tag.
<!DOCTYPE HTML>
<html>
<body>
<script>
alert( 'Namastey Javascript 🙏' );
</script>
</body>
</html>
The above code will result in an alert to the page as below.
JavaScript Today
Wishing you a Happy New Year
Thanks for your time and patience to go through this and I do hope you have learned something.