Some programming experiences with any languages such as C, Java, or Visual Basic is useful, but not necessary.
On the server side, JS is used to create web server programs that process the information submitted by a web browser and then update the browser’s web page accordingly.
Therefore, it is also used in conjunction with HTML and CSS to design interactive and responsive web pages and websites. It helps to improve website or webpage functionality.
3. It supports both client-side and server-side scripting.
9. It is a case-sensitive language.
11. It provides good control to the users over the web browsers.
13. Since JS is open-source, therefore, everyone can use JS without purchasing a license.
14. Since JS is a client-side scripting language, JS code can be directly embedded into HTML pages.
It helped to stabilize the core features but the name, sounding like some kind of disease, was not widely used at that time.
1. ECMAScript 6 (ES6, 6th edition):
This edition was released in June 2015. In this edition of ECMAScript, there was added new syntax for complex applications, included iterators and for…of loops, arrow functions, maps, typed-arrays, promises, variable declarations using let and const, and many more.
2. ECMAScript 7 (ES7, 7th edition):
3. ECMAScript 8 (ES8, 8th edition):
4. ECMAScript 9 (ES9, 9th edition):
5. ECMAScript 10 (ES10, 10th edition):
This version (released in June 2019) introduced features to object prototypes and changes to Array sorting.
6. ECMAScript 11 (ES11, 11th edition):
7. ECMAScript 12 (ES12, 12th edition):
The 12th edition, ECMAScript 12 was released in June 2021. This edition introduces the features like replaceAll method for strings; Promise.any, AggregateError, WeakRef, and FinalizationRegistry, separators for numeric literals, logical assignment operators, and Array.prototype.sort.
Let’s understand in short one by one with examples. In further tutorials, we will discuss this in more detail.
Example 1: <scirpt> document.write("Good morning"); </script> Example 2: <script> alert("Good evening"); </script>
Now, we will have to save it as .js file named alertscript.js. This .js file can be called by using the below syntax placed in the head section just before the closing head tag like this:
Some Useful Terminology:
1. Website: A website is a collection of web pages, graphics, and multimedia objects.
3. Web server: A computer that stores webpages in form of directories and files and provides these files to be read is called web server. It runs some special software like Apache.
The main function of web server is to accept client requests for information and respond to client requests through web pages with request information.
4. Web client/Web browser: A computer that provides the facility to read information stored in the format of text, graphics, animation from the web pages is called web client.
Web client installs the special application software called web browser that connects to the appropriate server and provides an interface to read information returned by the web server.
5. Client-side scripting language: Scripts that are executed by web browsers with or without connecting web server is called client-side scripting language.
6. Server-side scripting language: Scripts that are executed and processed by web server is called server-side scripting language.
Examples of server-side scripting languages are PHP, JSP, etc. Script code is run at a server and is more secure. It takes too must time compare to the client-side script because it needed sending requests to the server for execution.
- Client-side validation
- Creating dynamic drop-down menus.
- Creating cookies.
- Validating input data.
- Displaying date and time
- Displaying pop-up windows and dialog boxes (like an alert dialog box, confirm dialog box, and prompt dialog box),
Displaying clocks, etc.
In case of any discrepancy, the whole website does not need to be reloaded. The web browser updates only the elected part of the page.
Therefore, the client-side scripts can produce a little unpredictable output. While server-side scripts will always produce the same output.
3. Single inheritance: JS only supports single inheritance, not multiple inheritance.
Frequently Asked Questions in Google Search
Ans: If you are reading this tutorial to learn basic knowledge such as how to create web forms and minor scripts, you will not need to read everything.
But if you are trying to learn how to create dynamic web pages, how to develop plugins, etc. then you will need to understand everything in here.