DEV Community

Cover image for Introduction of JavaScript
Asfaqullah Asif
Asfaqullah Asif

Posted on

Introduction of JavaScript

Definition Of JavaScript

JavaScript is a single-threaded and interpreted programming language that is used for building web applications that supports both the client-side and server-side development.
Now a days JavaScript use as a Full Stack Development Language.

-> Single thread language that's why it executes one tasks at a time.
-> Interpreted Language which means it executes codes line by line from top to bottom approach.
-> Dynamically typed because of its data type variables is decided in Run-Time in JavaScript.

Key Features of JavaScript.

Here are some key features in JavaScript that makes it so powerful in web development.

  1. Platform Independent: This refers you can run your JS applications on different OS environment(like, Windows, Linux, macOS, Android, IOT), different web-browser, different hardware architecture (like, 32bit or 64bit systems) and different executions environments (like, client-side for example on browser or server-side for example Node.js)

  2. Event-Driven: Real-Time user's actions responds like it shows the changes on clicks, keystroke, mouseover and so on in real time changes.

  3. Versatile: JavaScript can be used for a wide range of tasks, from simple calculations to complex server-side applications.

  4. Asynchronous: Being a single threaded language JavaScript executes one tasks at a time and blocks the other tasks until the prior task completed. To resolve this JavaScript offers Asynchronous programming which makes the web development more efficient.

4.Rich-Ecosystem: There are numerous number of libraries and frameworks built on JavaScript like React.js, Angular.js and vue.js that makes development more faster and efficient.

JavaScript Limitations

Instead of its power, JavaScript has some limitations.

  1. Performance: It is slower than traditional language for complex tasks but for simple tasks its performance is not a major issue.

  2. Security Compromise: In JavaScript Application can be attack by XSS(cross-site-scripting),where malicious scripts are injected in website to steal data by exploiting elements like

<img>
Enter fullscreen mode Exit fullscreen mode

,

<object>
Enter fullscreen mode Exit fullscreen mode

or

<script>
Enter fullscreen mode Exit fullscreen mode

tags.

3.Complexity: To write advanced program in JavaScript, programmers need to understand core programming concepts, object, client and server side scripting, which is more challenging.

Top comments (0)