JavaScript Events

HTML events are “things” that happen to HTML elements. When JavaScript is used in HTML pages, JavaScript can “react” on these events. HTML Events An HTML event can be something the browser does, or something a user does. Here are some examples of HTML events: An HTML web page has finished loading An HTML…

JavaScript Objects

A javaScript object is an entity having state and behavior (properties and method). For example: car, pen, bike, chair, glass, keyboard, monitor etc. JavaScript is an object-based language. Everything is an object in JavaScript. JavaScript is template based not class based. Here, we don’t create class to get the object.…

JavaScript Functions

JavaScript functions are used to perform operations. We can call JavaScript function many times to reuse the code. Advantage of JavaScript function There are mainly two advantages of JavaScript functions. Code reusability: We can call a function several times so it save coding. Less coding: It makes our program compact. We…

JavaScript Data Types

JavaScript provides different data types to hold different types of values. There are two types of data types in JavaScript. Primitive data type Non-primitive (reference) data type JavaScript is a dynamic type language, means you don’t need to specify type of the variable because it is dynamically used by JavaScript engine. You need…

JavaScript Operators

JavaScript operators are symbols that are used to perform operations on operands. For example: Here, + is the arithmetic operator and = is the assignment operator. There are following types of operators in JavaScript. Arithmetic Operators Comparison (Relational) Operators Bitwise Operators Logical Operators Assignment Operators Special Operators JavaScript Comparison Operators…

JavaScript Variable

A JavaScript variable is simply a name of storage location. There are two types of variables in JavaScript : local variable and global variable. There are some rules while declaring a JavaScript variable (also known as identifiers). JavaScript variables are containers for storing data values. In this example, x, y, and z, are variables: From…

JavaScript Comments

JavaScript comments can be used to explain JavaScript code, and to make it more readable. JavaScript comments can also be used to prevent execution, when testing alternative code. There are mainly two advantages of JavaScript comments. To make code easy to understand It can be used to elaborate the code so…

Introduction

JavaScript is the programming language of HTML and the Web. JavaScript is easy to learn. This tutorial will teach you JavaScript from basic to advanced. The <script> Tag In HTML, JavaScript code must be inserted between <script> and </script> tags. Old JavaScript examples may use a type attribute: <script type=”text/javascript”>.The type attribute is not…

RSS20
Follow by Email
Facebook20
Pinterest9