Void,d Typeof, New, Delete, Comma operators

Void operator Void is a unary operator that can appear before an expression with any value. It always discards its operand value and simply returns an undefined value. Example of void operator function hello() { alert(“function entered”); return true: } alert(hello()); Typeof operator The typeof operator is used to check the data type of its … Read more Void,d Typeof, New, Delete, Comma operators

JavaScript math object

In JavaScript, the function related to mathematics are implemented as methods of the math object. The Methods of the math object are divided into two categories: Arithmetic Method and Trigonometry Method. List of arithmetic methods abs() The abs() method returns the absolute value of number. The method used to find absolute value is written as … Read more JavaScript math object

JavaScript Dialog box

JavaScript provides the ability to create small window called dialog boxes. Dialog boxes appear as separate windows and their content depends on the information provided by user. Its enable us to receive input from the user and display messages to the user. There are three types of dialog boxes is: alert, prompt and confirm. Alert … Read more JavaScript Dialog box

First JavaScript program

JavaScript programs can be written using various editors. Such as Notpad, MS-fornt page, etc. Let us take a simple example to print out “Hello World”. First open Notepad, and type the following code in it and save it as .html extension. Then open the web browser and load the file from browser’s menu and check … Read more First JavaScript program

JavaScript Conventions

Case Sensitivity JavaScript is a case sensitive language. This mean that the language keywords, variables, function names and any other identifier must always be typed with a consistent capitalization of letters. For example: The while keyword must be type “white” and not “White” or “WHITE”. White-space and line Breaks. Javascript ignores spaces, tabs, and newlines … Read more JavaScript Conventions

JavaScript Datatype

JavaScript supports four primitive datatype and complex types as arrays and object. Primitive data types are types that can be assigned a single literal value such as number, string or boolean value. Literals are fixed values. Number Datatype Number consists of integer and floating point number and the special NAN (Not a Number value). Integer … Read more JavaScript Datatype

JavaScript Datatype

JavaScript supports four primitive datatype and complex types as arrays and object. Primitive data types are types that can be assigned a single literal value such as number, string or boolean value. Literals are fixed values. Number Datatype Number consists of integer and floating point number and the special NAN (Not a Number value). Integer … Read more JavaScript Datatype

JavaScript Keywords

Keywords are the certain reserved words that have predefined meaning. These words cannot be used as identifiers in JavaScript program. The list of keyword in JavaScript. break do function null typeof case else if return var continue export import switch void default false in this while delete for new true with There are also certain … Read more JavaScript Keywords