- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 10711 Articles for Web Development
![Saurabh Jaiswal](https://www.tutorialspoint.com/assets/profiles/500262/profile/60_1406912-1660202490.jpg)
3K+ Views
JavaScript is a lightweight and interpreted language, therefore, inside the context of a web browser, you don't even need to buy a compiler. You can start with a simple text editor such as Notepad. To make our life simpler, various vendors have come up with very nice JavaScript editing tools. Some of them are listed here − Microsoft FrontPage − Microsoft has developed a popular HTML editor called FrontPage. FrontPage also provides web developers with a number of JavaScript tools to assist in the creation of interactive websites. Macromedia Dreamweaver MX − Macromedia Dreamweaver MX is a very popular ... Read More
![Ali](https://www.tutorialspoint.com/assets/profiles/14292/profile/60_101553-1513052445.jpg)
149 Views
Yes, this can be done. When you have a global scope, you can use a variable without declaring it. The following “no var” variable “points” will look at the scope chain, wince var keyword isn’t use − var rank = 5; points = 50; marks = 300; // Anonymous function (function() { points = 100; //overwrites global scope points var rank = 4; //new rank variable is created in this' function's scope var marks = 900; document.write(rank+"\r"); //prints 4 document.write(points+"\r"); //prints 100 document.write(marks+"\r"); //prints 900 })(); document.write(''); document.write(''); document.write(rank+"\r"); //prints 5 document.write(points+"\r"); //prints 100 document.write(marks+"\r"); //prints 300
![Rahul Sharma](https://www.tutorialspoint.com/assets/profiles/14297/profile/60_102977-1513054044.jpg)
169 Views
When you can use a JavaScript variable before it is declared, it is done using a technique called hoisting. The parser read through the complete function before running it.The behavior in which a variable appears to be used before it is declared is known as hoisting −For example, the following,points =200; var points;The above works the same like the following −var points; ponts = 200;
![Johar Ali](https://www.tutorialspoint.com/assets/profiles/14293/profile/60_101691-1513053093.jpg)
2K+ Views
In jQuery, if you want an event to work on your page, you should call it inside the $(document).ready() function. Everything inside it will load as soon as the DOM is loaded and before the page contents are loaded.$(document).ready(function() { alert(“Document loaded successful!"); });ExampleIn JavaScript, to achieve the same result like $(document).ready, try the following code − var loader = setInterval(function () { if(document.readyState !== "complete") return; clearInterval(loader); alert(“Document loaded successful!"); // document.write("Document loaded successful!"); }, 300);
![Shubham Vora](https://www.tutorialspoint.com/assets/profiles/485898/profile/60_1456867-1657516792.jpeg)
12K+ Views
In this tutorial, we will learn to validate decimal numbers in JavaScript. A number containing decimal(.) is known as a decimal number. A number comes between the two whole numbers, called decimal numbers. We use decimal numbers in calculations, progress bars, to accept input in forms, etc. A regular expression is a well-known entity for validation purposes. A Regular expression is a search pattern of characters with a specific meaning used to validate the data. It can be used for any string or number. We are going to use it for validation purposes in JavaScript. We used a simple logic ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
2K+ Views
A data type is known as a composite data type when it represents a number of similar or different data under a single declaration of variable i.e., a data type that has multiple values grouped together. There are mainly three types of composite data types named as below −ObjectArrayFunctionIn this article, we will discuss the first type of composite data type i.e. object.ObjectAn object is a collection of properties i.e, an object can store the properties of anything in the key-value pairs. An object in javascript has keys and each key has its own value as shown in the examplelet ... Read More
![Johar Ali](https://www.tutorialspoint.com/assets/profiles/14293/profile/60_101691-1513053093.jpg)
416 Views
The following is stated about declaration and initialization of a variable in ECMAScript specification −A var statement declares variables that are scoped to the running execution context’s VariableEnvironment. Var variables are created when their containing Lexical Environment is instantiated and are initialized to undefined when created. [...] A variable defined by a VariableDeclaration with an Initializer is assigned the value of its Initializer’s AssignmentExpression when the VariableDeclaration is executed, not when the variable is created.The above defines the difference:All variables are initialized with the value undefined.Variables declarations are initialized with undefined upon the initialization of their lexical environment.This initialization does ... Read More
![Ali](https://www.tutorialspoint.com/assets/profiles/14292/profile/60_101553-1513052445.jpg)
86 Views
Before you use a variable in a JavaScript program, you must declare it. Variables can be thought of as named containers. You can place data into these containers and then refer to the data simply by naming the container.Variables are declared with the var keyword as follows. You can also declare multiple variables with the same var keyword as follows − This is also you can assign values −var rank = 2; var points = 100;