Little Bit About JavaScript...
Introduction
Brendan Eich is the creator of the JavaScript programming language, who is an American technologist working in Mozilla Corporation. JavaScript is first released on 4th December 1995. JavaScript is an object-oriented programming language used in the web application development process. React js, Angular, Express.js are some popular JavaScript frameworks. Most of the things are based on objects in JavaScript. ECMAScript is the standard followed by JavaScript.
Comparison between Java and JavaScript
To understand more about JavaScript, consider the below comparison between Java and JavaScript.
But How JavaScript handle the concurrency?
Sequential Operation: This image shows three statements(Operations). In a sequential means first, execute A and wait for the result and then execute B and wait for the result. After that execute c and wait for the result likewise if there are more operations all these operations are executed in a sequential manner.
Asynchronous Operation: Asynchronous operations are also executed in a sequential manner But can't guarantee that a process is waiting for the executions for a particular statement. As an example from the above image, first, execute the A statement and not wait for the result and go for the B statement.
JavaScript handles its concurrency by this asynchronous nature. CPU operations in javascript are synchronous. But I/O operations like(Network call, Database Read/Write, File Handling, etc.) are asynchronous. Behind the JavaScript Engine, there is a special thread pool to handle the I/O operations. Because of that JavaScript main thread not wait for the completion of I/O operations and the main thread executes on other operations while the thread pool handling the I/O operations. When there is a heavy I/O operation this performs well because of this thread pool. But they not operate well in CPU operations. JavaScript promises are one way of handling asynchronous.
Multithreading Usage in JavaScript
- Worker threads in JavaScript - This is a new feature introduced from JS13. It Shares the same memory locations and other characteristics.
- Processes and Forks - These are not actual threads and not share characteristics like a memory location.
ECMAScript
ECMAScript is a programming language standard and commonly used for scripting web pages. This is a JavaScript standard for the responsiveness of web pages in different browsers.
JavaScript Engines in Different Web Browsers
- Firefox Browser - SpiderMonkey
- Google Chrome - V8 Engine
- Microsoft Edge - Chakra
- Safari - Niro(JavaScriptCore)
- https://upload.wikimedia.org/wikipedia/commons/thumb/9/99/Unofficial_JavaScript_logo_2.svg/480px-Unofficial_JavaScript_logo_2.svg.png
- https://upload.wikimedia.org/wikipedia/commons/thumb/c/cf/Angular_full_color_logo.svg/1200px-Angular_full_color_logo.svg.png
- https://static.javatpoint.com/tutorial/reactjs/images/reactjs-tutorial.png
- https://en.wikipedia.org/wiki/JavaScript



