- Client-side: It supplies objects to control a browser and its Document Object Model (DOM). Like if client-side extensions allow an application to place elements on an HTML form and respond to user events such as mouse clicks, form input, and page navigation. Useful libraries for the client-side are AngularJS, ReactJS, VueJS and so many others.
- Imperative language – In this type of language we are mostly concern about how it is to be done . It simply control the flow of computation . The procedural programming approach , object, oriented approach comes under this like async await we are thinking what it is to be done further after async call.
- Declarative programming – In this type of language we are concern about how it is to be done , basically here logical computation require . Here main goal is to describe the desired result without direct dictation on how to get it like arrow function do .
Output: The output will display on the console.
Welcome to GeeksforGeeks
- Functions in JS are objects. They may have properties and methods just like another object. They can be passed as arguments in other functions.
- Can handle date and time.
- Performs Form Validation although the forms are created using HTML.
- No compiler is needed.
- Weak error handling and type checking facilities: It is weakly typed language as there is no need to specify the data type of the variable. So wrong type checking is not performed by compile.
Additionally, when compared with other programming languages, it has less in-built libraries or frameworks, contributing as another reason for it to be lightweight. However, this brings it a drawback that we need to incorporate external libraries and frameworks.
The V8 engine initially uses an interpreter, to interpret the code. On further executions, the V8 engine finds patterns such as frequently executed functions, frequently used variables, and compiles them to improve performance.