Introduction-to-JS 1
Introduction-to-JS 1
Topperworld.in
Introduction to JS
⚫ It was introduced in the year 1995 for adding programs to the webpages in
the Netscape Navigator browser. Since then, it has been adopted by all other
graphical web browsers.
⚫ With JavaScript, users can build modern web applications to interact directly
without reloading the page every time. The traditional website uses js to
provide several forms of interactivity and simplicity.
Syntax:
<script>
// JavaScript Code
</script>
©Topperworld
JavaScript
❖ History of JavaScript
❖ JavaScript Versions
o JavaScript is a modern scripting language that is popular worldwide
among developers.
o Over the years the language has improved a lot and a lot of new features
have been added which make the coding process even easier. This
language became an ECMA standard in the year 1997.
©Topperworld
JavaScript
ECMAScript
ES1 1997 Initial Release
1
ECMAScript
ES2 1998 Minor Editorial Changes
2
Added:
• Regular Expression
ECMAScript
ES3 1999 • try/catch
3
• Exception Handling
• switch case and do-while
ECMAScript
ES4 Abandoned due to conflicts
4
Added:
Added:
©Topperworld
JavaScript
• for..of loop
• Arrow functions
Added:
Added:
ECMAScript • Object.values
ES8 2017
2017 • Object.entries
• Object.getOwnPropertiesDescriptors
Added:
ECMAScript
ES9 2018 • spread operator
2018
• rest parameters
Added:
ECMAScript • Array.flat()
ES10 2019
2019 • Array.flatMap()
• Array.sort is now stable
©Topperworld
JavaScript
Added:
ECMAScript
ES11 2020 • BigInt primitive type
2020
• nullish coalescing operator
Added:
ECMAScript
ES12 2021 • String.replaceAll() Method
2021
• Promise.any() Method
Added:
<html>
<body>
<!-- JavaScript code can be embedded inside
body section -->
<script>
©Topperworld
JavaScript
console.log("Welcome to Topperworld");
</script>
</body>
</html>
Welcome to Topperworld
❖ Features of JavaScript
o According to a recent survey conducted by Stack Overflow, JavaScript is
the most popular language on earth.
©Topperworld
JavaScript
o JavaScript was created in the first place for DOM manipulation. Earlier
websites were mostly static, after JS was created dynamic Web sites
were made.
o Functions in JS are objects. They may have properties and methods just
like other objects. They can be passed as arguments in other functions.
o Can handle date and time.
o Performs Form Validation although the forms are created using HTML.
o No compiler is needed.
❖ Applications of JavaScript
©Topperworld
JavaScript
Art: Artists and designers can create whatever they want using
JavaScript to draw on HTML 5 canvas, and make the sound more
effective also can be used p5.js library.
©Topperworld
JavaScript
❖ Advantage of JavaScript
Less server interaction: You can validate user input before sending
the page off to the server. This saves server traffic, which means less
load on your server.
❖ Limitations of JavaScript
©Topperworld
JavaScript
©Topperworld