---
title: "What is JavaScript?"  
description: "What is JavaScript?"  
author: "Ravi Vishwakarma"  
published: 2021-07-19  
updated: 2023-06-01  
canonical: https://answers.mindstick.com/qa/93724/what-is-javascript  
category: "web application"  
tags: ["javascript", "web programming"]  
reading_time: 6 minutes  

---

# What is JavaScript?

What is [javascript](https://www.mindstick.com/articles/1530/design-a-simple-stylish-calculator-using-html-css-and-javascript) and why are use in [web application](https://www.mindstick.com/articles/13069/progressive-web-application-pwas-all-you-need-to-know-about).

## Answers

### Answer by user

## JavaScript

JavaScript is an object-based scripting language which is lightweight and cross-platform. JavaScript is not a compiled language, but it is a translated language. The JavaScript Translator (embedded in the browser) is responsible for translating the JavaScript code for the [web](https://www.mindstick.com/forum/34611/internet-and-web) browser. JavaScript (js) is a light-weight object-oriented programming language which is used by several websites for scripting the webpages. It is an interpreted, full-fledged programming language that enables dynamic interactivity on websites when applied to an HTML document. 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.

**Features of JavaScript** There are many features of JavaScript. 1. It is light-weighted and interpreted language. 2. It is case sensitive language. 3. It provide good control on web browser. 4. JavaScript is support cross platform. 5. JavaScript is object oriented programming language this is use the prototype. 6. JavaScript fallow the syntax and structure of ‘C’ programming language. 7. JavaScript is a weakly typed language. **Application of JavaScript** 1. Client side validation 2. Dynamic drop-down menu 3. Display the pop-up window 4. Dynamic changes in inner html 5. Hiding and showing the elements **Syntax:**

```
 <script>
      //variable
      //function
      //objects
      //class
      //properties
      //message box
 </script>
```

**Example:**

```
<!DOCTYPE html>
<html lang='en' xmlns='http://www.w3.org/1999/xhtml'>
<head>
    <meta charset='utf-8' />
    <title>JS Demo</title>
    <script>
        alert('this is alert box');
    </script>
</head>
<body>
    <p>ALert Demo by using js</p>
</body>
</html>
```

## Output:

![What is JavaScript?](https://answers.mindstick.com/questionanswer/d6bc8123-0b04-49bd-8639-f3a3f68a05dc/images/59c09798-7f07-4262-b91d-7e2b9105ed72.png) **\**

### Answer by Ethan Karla

We can say that JavaScript is not a core programming language but it is a scripting language. It is mainly used in browsers and can only be used with HTML or CSS. Often people do not know the difference between JavaScript and Java and they end up understanding both as the same. Well that doesn't happen at all. These two languages are completely different. JavaScript is a very commonly used client side scripting language. Or we can say that it is used in all web browsers for handling error, exception, action etc. JavaScript is a scripting language, its code can also be written in HTML pages. So when a user requests an HTML page that contains a JavaScript, this script is sent to the browser and it is up to the browser what it wants to do with it.

## Why are use the JavaScript

1. Game development
2. building web server
3. client and server side validation
4. developing web and mobile apps
5. add behavior in web pages
6. display popup menu and dialog boxes

## Feature of JavaScript

1. it is a structured programming language.
2. JavaScript is an object-oriented programming language that uses prototypes, classes and objects.
3. It is a light-weighted, interpreted language.
4. It is a case-sensitive language.
5. JavaScript is support in several operating systems including, Windows, macOS, etc.
6. It provides good control and validation to the users on the web browser.

## Example

```
<!DOCTYPE html>
<html>
<body>
<h2>My First JavaScript</h2>
<button type='button' onclick = 'document.getElementById('demo').innerHTML = Date()'>Click me to display Date and Time.</button>
<p id='demo'></p>
</body>
</html>
```

Output:

![What is JavaScript?](https://answers.mindstick.com/questionanswer/d6bc8123-0b04-49bd-8639-f3a3f68a05dc/images/93043e58-4c5a-49a5-8773-06af6dbf375a.png)\

### Answer by ginivod ali

To ensure your bestallterraintires are properly inflated, check the tire pressure regularly using a tire pressure gauge. The pressure should be at the level recommended by your vehicle's manufacturer, which can be found in the owner's manual or on a sticker inside the driver's side door jamb. It's important to check the tire pressure when the tires are cold, as heat from driving can cause the pressure to increase and give you an inaccurate reading.

### Answer by Muskan Digital

JavaScript is a high-level, interpreted programming language primarily used for adding interactivity and dynamic behavior to web pages. It is a versatile language that can be run on the client-side (in the web browser) as well as on the server-side (with the help of frameworks like Node.js).

### Answer by user

JavaScript is a high-level programming language primarily used for creating interactive and dynamic elements on websites. It is a versatile language that allows developers to add functionality to web pages, manipulate and validate data, and interact with users.

Here are some key features and aspects of JavaScript:

Client-side scripting: JavaScript is primarily executed on the client-side, meaning it runs in the web browser of the user. It enables web developers to create interactive elements, handle form validation, respond to user actions, and modify the content of web pages dynamically.

Object-oriented programming: JavaScript supports object-oriented programming (OOP) concepts, such as objects, classes, and inheritance. Developers can create objects with properties and methods, define classes for object blueprints, and establish relationships between objects.

Event-driven programming: JavaScript is event-driven, meaning it can respond to various events triggered by user actions (like clicks or keyboard inputs) or other events occurring on a web page. Developers can assign event handlers to specific elements and define the actions to be taken when those events occur.

Cross-platform compatibility: JavaScript is supported by all major web browsers, making it a widely compatible language for web development. It can run on different operating systems, including Windows, macOS, and Linux.

Integration with HTML and CSS: JavaScript seamlessly integrates with HTML and CSS, the core technologies of web development. It can manipulate HTML elements, modify CSS styles, and dynamically update the content and appearance of web pages.

Wide range of frameworks and libraries: JavaScript has a vast ecosystem of frameworks and libraries that extend its capabilities and simplify complex tasks. Some popular frameworks include React.js, Angular, and Vue.js, which facilitate building robust web applications.

Server-side development: With the introduction of technologies like Node.js, JavaScript can now be used for server-side development as well. It allows developers to build web servers, APIs, and perform backend operations using JavaScript.

JavaScript is a powerful language that has become essential in modern web development. Its versatility, ease of use, and extensive community support have contributed to its widespread adoption and popularity among developers.

Please visit:-https://www.janbasktraining.com/online-java-training


---

Original Source: https://answers.mindstick.com/qa/93724/what-is-javascript

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
