Updated: 11/13/2018 by Computer Hope

JavaScript or JS logoDeveloped by Brendan Eich and originally known as LiveScript, the programming language JavaScript was renamed in 1995. JavaScript is an interpreted client-side scripting language that allows a web designer the ability to insert code into their web page. JavaScript is commonly placed into an HTML or ASP file and runs directly from the web page. It is utilized to perform tasks such as printing the time and date, create a calendar, or other tasks that are not possible through plain HTML.

Hello, World! in JavaScript

<! -- Hide from old browsers
document.write('Hello World!');
// Stop hide -->

Tip: With HTML5 you no longer need to specify the language attribute.

JavaScript Example

Below is an example of a JavaScript implemented into this page that will print the current time and date. Like all JavaScript files, the user's Internet browser must be capable of viewing JavaScript and the execution of JavaScript must be enabled. If JavaScript is not enabled, the time and date will not be visible.

Tip: See the JavaScript time and date source code to use these JavaScript features in a web page.

Although JavaScript files are often embedded into the HTML file, users can also save their JavaScript code in an external file. This file often ends with a .js file extension.

Bookmarklet, Grasshopper, Java, JavaScript Hijacking, JavaScriptCore, jQuery, JScript, LiveScript, Programming terms, Server-side scripting, VBScript, Web design terms