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 browser.
Features of JavaScript
There are following features of JavaScript:
1. All popular web browsers support JavaScript as they provide built-in execution environments.
2. JavaScript follows the syntax and structure of the C programming language. Thus, it is a structured programming language.
3. JavaScript is a weakly typed language, where certain types are implicitly cast (depending on the operation).
4.JavaScript is an object-oriented programming language that uses prototypes rather than using classes for inheritance.
5.It is a light-weighted and interpreted language.
6.It is a case-sensitive language.
Application of JavaScript
1. Client-side validation,
2. Dynamic drop-down menus,
3. Displaying date and time,
4. Displaying pop-up windows and dialog boxes (like an alert dialog box, confirm dialog box and prompt dialog box),
5. Displaying clocks etc.
<html>
<body>
<h2>Welcome to JavaScript</h2>
<script>
document.write("Hello JavaScript by reBLISS");
</script>
</body>
</html>
JavaScript Introduction
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 browser.
Features of JavaScript
There are following features of JavaScript:
1. All popular web browsers support JavaScript as they provide built-in execution environments.
2. JavaScript follows the syntax and structure of the C programming language. Thus, it is a structured programming language.
3. JavaScript is a weakly typed language, where certain types are implicitly cast (depending on the operation).
4.JavaScript is an object-oriented programming language that uses prototypes rather than using classes for inheritance.
5.It is a light-weighted and interpreted language.
6.It is a case-sensitive language.
Application of JavaScript
1. Client-side validation,
2. Dynamic drop-down menus,
3. Displaying date and time,
4. Displaying pop-up windows and dialog boxes (like an alert dialog box, confirm dialog box and prompt dialog box),
5. Displaying clocks etc.
Try It your self
The script tag specifies that we are using JavaScript.
The document.write() function is used to display dynamic content through JavaScript.
Places to put JavaScript code
Between the body tag of html
Between the head tag of html
In .js file (external javaScript)