Script
Scripting refers to a series of commands that are interpreted and executed sequentially and immediately on occurance of an event.
There are two types of Scripting language
- Client-side scripting
- Refers to the script being executed on the client's machine by the browser
- Server-side scripting
- Refers to the script being executed on a web server to generate dynamic HTML pages.
JAVASCRIPT
Java script is a scripting language that allows you to build dynamic Web page by ensuring maximum user interactivity.
Javascript language is an Object based language,which means that it provides objects for specifying functionality.
History Of Javascript
It was created in 1995 by Brendan Eich while he was an engineer at Netscape. It was originally going to be named LiveScript but was renamed. Unlike most programming languages, JavaScript language has no concept of input or output. It is designed to run as a scripting language in a host environment, and it is up to the host environment to provide mechanisms for communicating with the outside world. The most common host environment is the browser.
Java script version

How JavaScript makes HTML build website better?
- JavaScript is an advanced programming language that makes web pages more interactive and dynamic whereas HTML is a standard markup language that provides the primary structure of a website.
- JavaScript simply adds dynamic content to websites to make them look good and HTML work on the look of the website without the interactive effects and all.
- JavaScript manipulates the content to create dynamic web pages whereas HTML pages are static which means the content cannot be changed.
- JavaScript is not cross-browser compatible whereas HTML is cross-browser compatible.
- JavaScript can be embedded inside HTML but HTML can not be embedded inside JavaScript.
Script Tag
The <script> tag defines a script for an HTML Page to make them interactive
Hello World using Javascript
<html><head>
<title>javascript</title>
<script>
document.write("Hello World");
</script>
</head>
<body>
</body>
</html>
Output
Methods
Javascript allows you to display information using the methods of the document object.The document object is predefined object in javascript,which represents the HTML Page.
- write():Display any type of Data.
- writeln():Display any type of Data and appends a new line character.
<head>
<title>javascript</title>
<script>
document.write("javascript");
document.writeln("is a scripting ");
document.write("and case sensitive language");
</script>
</head>
<body>
</body>
</html>
Output
javascript comment
The JavaScript comments are meaningful way to deliver message. It is used to add information about the code, warnings or suggestions so that end user can easily interpret the code.
The JavaScript comment is ignored by the JavaScript engine i.e. embedded in the browser.
Javascript support Two Types of comment
- Single line comment Single line comments start with //.Any text between // and the end of the line will be ignored by JavaScript (will not be executed).
- Multi line comment Multi-line comments start with /* and end with*/.Any text between/* and */ will be ignored by JavaScript.
<html>
<head>
<title>javascript</title>
<script>
//using script tag
document.write("javascript");
document.writeln("is a scripting ");
document.write("and case sensitive language");
/*document.write("i am comment");
document.writeln("java script ");
*/
</script>
</head>
<body>
</body>
</html>