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).
What is JavaScript?
What is javascript and why are use in web application.
3 Answers
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.
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
- Game development
- building web server
- client and server side validation
- developing web and mobile apps
- add behavior in web pages
- display popup menu and dialog boxes
Feature of JavaScript
- it is a structured programming language.
- JavaScript is an object-oriented programming language that uses prototypes, classes and objects.
- It is a light-weighted, interpreted language.
- It is a case-sensitive language.
- JavaScript is support in several operating systems including, Windows, macOS, etc.
- 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: