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
- 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
- Minify JavaScript
- 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 Promises
- JavaScript Closures
- Hoisting in JavaScript
- Callback Function in JavaScript
- JavaScript For Loop
- JavaScript Foreach
- JavaScript Map
- JavaScript Set JavaScript SetTimeout()
- JavaScript splice
- Difference between Java and JavaScript
- JavaScript DOM
- JavaScript Filter
- JavaScript Prototype
- JavaScript Substring
- JavaScript Void 0
- JavaScript Array Methods
- JavaScript indexOf()
- JavaScript split()
- JavaScript typeOf()
- arrow() function in JavaScript
- How to enable JavaScript in Chrome
- JavaScript alert()
- JavaScript Date Format
- JavaScript Includes
- JavaScript replace()
- parseInt() in JavaScript
- Async await in JavaScript
- Event Loop in JavaScript
- JavaScript Array Length
- JavaScript class
- JavaScript reverse string
- JavaScript SetInterval()
- JavaScript Uses
- onClick() JavaScript
- JavaScript Array of Objects
- JavaScript Console Log
- JavaScript Create Object
- JavaScript Frameworks
- JavaScript Regex
- JavaScript this
- TypeScript vs JavaScript
- Currying JavaScript
- Ajax JavaScript
- Callback and Callback Hell in JavaScript