What is JavaScript?
JavaScript may be a terribly powerful client-side scripting language. JavaScript is employed primarily for enhancing the interaction of a user with the webpage. In different words, you’ll build your webpage a lot of spirited and interactive, with the assistance of JavaScript. It is additionally getting used wide in game development and Mobile application development.
The History
JavaScript was developed by Brendan Eich in 1995, that appeared in the web browser, a preferred browser of that point.
The language was at the start referred to as LiveScript and was later renamed JavaScript. There are several programmers WHO suppose that JavaScript and Java are similar. In fact, JavaScript and Java are pretty much unrelated. Java may be a terribly advanced artificial language whereas JavaScript is barely a scripting language. The syntax of JavaScript is usually influenced by artificial language C.
How to Run JavaScript?
Being a scripting language, JavaScript cannot run on its own. In fact, the browser is to blame for running JavaScript code. once a user requests Associate in Nursing hypertext mark-up language page with JavaScript in it, the script is distributed to the browser and it’s up to the browser to execute it. the biggest advantage of JavaScript is that every fashionable internet browsers support JavaScript. So, you are doing not ought to worry regarding whether or not your web site traveller uses net adventurer, Google Chrome, Firefox or other browsers. JavaScript is supported. Also, JavaScript runs on any software as well as Windows, UNIX or raincoat. Thus, JavaScript overcomes the most disadvantages of VBScript (Now deprecated) that is restricted to simply id est and Windows.
Tools you wish
To start with, you wish a text editor to write down your code and a browser to show the net pages you develop. you’ll use a text editor of your alternative as well as Notepad++, Visual Studio Code, chic Text, Atom or the other text editor you’re snug with. you’ll use any application as well as Google Chrome, Firefox, Microsoft Edge, net adventurer etc.
A Simple JavaScript Program
You should place all of your JavaScript code at intervals tags ( and ) if you’re keeping your JavaScript code within the hypertext mark-up language document itself. This helps your browser distinguish your JavaScript code from the remainder of the code. As there are different client-side scripting languages (Example: VBScript), it’s extremely suggested that you just specify the scripting language you employ. you’ve got to use the sort attribute at intervals the tag and set its worth to text/javascript like this:
<script type="text/javascript">
<html> <head> <title>My First JavaScript code!!!</title> <script type="text/javascript"> alert("Hello World!"); </script> </head> <body> </body> </html>
Summary
JavaScript may be a client-side scripting language developed by Brendan Eich.
JavaScript may be run on any in operation systems and most internet browsers.
You need a text editor to write JavaScript code and a browser to show your website. you’ll check suggested IDEs!