JavaScirpt Tutorial Index

JavaScript Tutorial Javascript Example Javascript comment Javascript Variable Javascript Data Types Javascript Operators Javascript If Else Javascript Switch Statement Javascript loop JavaScript Function Javascript Object JavaScript Arrays Javascript String Javascript Date Javascript Math Javascript Number Javascript Dialog Box Javascript Window Object Javascript Document Object Javascript Event Javascript Cookies Javascript getElementByID Javascript Forms Validation Javascript Email Validation Javascript Password Validation Javascript Re-Password Validation Javascript Page Redirect Javascript Print

Misc

JavaScript P5.js JavaScript Minify JavaScript redirect URL with parameters Javascript Redirect Button JavaScript Ternary Operator JavaScript radio button checked value JavaScript moment date difference Javascript input maxlength JavaScript focus on input Javascript Find Object In Array JavaScript dropdown onchange JavaScript Console log Multiple variables JavaScript Time Picker Demo JavaScript Image resize before upload Functional Programming in JavaScript JavaScript SetTimeout() JavaScript SetInterval() Callback and Callback Hell in JavaScript Array to String in JavaScript Synchronous and Asynchronous in JavaScript Compare two Arrays in JavaScript Encapsulation in JavaScript File Type Validation while Uploading Using JavaScript or jquery Convert ASCII Code to Character in JavaScript Count Character in string in JavaScript Get First Element of Array in JavaScript How to convert array to set in JavaScript How to get current date and time in JavaScript How to Remove Special Characters from a String in JavaScript Number Validation in JavaScript Remove Substring from String in JavaScript

Interview Questions

JavaScript Interview Questions

Javascript Tutorial

This JavaScript tutorial helps beginners and professionals to learn JavaScript easily.

What is JavaScript

JavaScript is a dynamic computer programming language. It is object-based scripting language i.e. lightweight and cross-platform.

We can make our web page more lively and interactive, with the help of JavaScript.

It was created by Brendan Eich at Netscape in 1995.

It is used to create interactive websites. It is mostly used for:

  • Client-side validation.
  • It has Dynamic drop-down menus.
  • It Displaying date and time.
  • Validate user input in HTML form before sending the data to a server.
  • Build forms that respond to user input without accessing a server.
  • Open and close new windows or frames.
  • Displaying popup windows and dialog boxes.(like alert dialog box, confirm dialog box prompt dialog box)
  • Build small but complete client side programs.
  • Displaying clocks etc.
  • Mobile application and game development.

Features of Javascript

  • JavaScript is an object-based scripting language.
  • It is case sensitive language.
  • It is light weighted.
  • Every statement in JavaScript must be terminated with semicolon (;).

Advantages of Javascript

  • JavaScript is an interpreted language. It requires no compilation process so no compiler is required. The browser interprets JavaScript as HTML tags.
  • JavaScript is relatively easy language. Any person can learn it very easily. It is use to develop dynamic and attractive websites.
  • JavaScript is executed on the client-side reduces the demand on the website server.
  • It provides conditional checking, loops and branching facilities that can be executed in a web pages.
  • JavaScript is relatively fast to the end user. They don’t have to wait for a page reload to see if they have forgotten to enter something.
  • Extended functionality to web pages. We can use JavaScript to include such items as drag-and-drop components and sliders to give extended functionality to our site visitors.

JavaScript Example with Online Editor

We have given online editor option with each JavaScript example. So, you can edit any example and see the changed output.

<h2>Welcome to JavaScript</h2>    
<script>    
document.write("Hello JavaScript by TutorialandExample");    
</script>

Output:

Welcome to JavaScript
Hello JavaScript by TutorialandExample

Prerequisite

To learn JavaScript you must have the knowledge of computer fundamentals only.

Audience

This JavaScript tutorial is written to help beginners and professionals both.

JavaScirpt Tutorial Index

Misc

Interview Questions