- 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
![Abhishek](https://www.tutorialspoint.com/assets/profiles/545227/profile/60_599940-1667195518.jpeg)
6K+ Views
In today’s time, almost everyone knows Google Chrome and how to use it for their comfort. But in the case of a developer, it is a must to have advanced knowledge of using Chrome because Chrome can help a developer tackle problems in many ways such as solving the problems or debugging the code with ease, inspecting the code, and finding JavaScript functions defined in the code. In this tutorial, we will learn how we can find a JavaScript function in Google Chrome that is defined in the JavaScript code. Here are three ways of finding the JavaScript function in ... Read More
![Anvi Jain](https://www.tutorialspoint.com/assets/profiles/13591/profile/60_98631-1512716973.jpg)
745 Views
The purpose of wrapping is to a namespace and control the visibility of member functions. It wraps the code inside a function scope and decreases clashing with other libraries. This is what we call Immediately Invoked Function Expression (IIFE) or Self Executing Anonymous Function.SyntaxHere’s the syntax −(function() { // code })();As you can see above, the following pair of parentheses converts the code inside the parentheses into an expression −function(){...}In addition, the next pair, i.e. the second pair of parentheses continues the operation. It calls the function, which resulted from the expression above.
![Shubham Vora](https://www.tutorialspoint.com/assets/profiles/485898/profile/60_1456867-1657516792.jpeg)
6K+ Views
In this tutorial, we will learn to find out the caller function in JavaScript. The function is the reusable code, and users can call it from anywhere. But sometimes, they need to know who is the caller function to perform some operation.For example, suppose that we can call any single function from another 2 to 3 functions, and we need to perform some operation according to the caller function. Users can understand this scenario by the below code example.function func3 () { If ( caller is func2() ) { // code for some operation } else if ( caller is func1() ){ // code for some different operation } ... Read More
![Shubham Vora](https://www.tutorialspoint.com/assets/profiles/485898/profile/60_1456867-1657516792.jpeg)
3K+ Views
A namespace is a programming concept that gives identifiers (names of types, functions, variables, etc.) scope to avoid name conflicts. For instance, a program may need to use the same variable name in many contexts. In such a case, namespaces will separate these contexts so that the same identifier may be utilized in many namespaces.The initialization and application of namespaces in JavaScript will be covered in this tutorial. A namespace is not by default available in JavaScript. Constructing a global object that contains all functions and variables, the JavaScript Namespace feature may be repeated. Because numerous libraries and components are ... Read More
![Rishi Rathor](https://www.tutorialspoint.com/assets/profiles/13563/profile/60_89283-1512714754.jpg)
2K+ Views
The ! symbol shows that it is an immediately-invoked function expression.The exclamation mark won’t invoke the function alone; you can put () at the end −!function foo() {}()() has higher precedence than ! and instantly calls the function.You can also mention it like the following −(function(){})();The ! allows the expression to return true. This is because by default all immediately-invoked function expression return undefined, so, we’re left with ! undefined, which is true.
![Saurabh Jaiswal](https://www.tutorialspoint.com/assets/profiles/500262/profile/60_1406912-1660202490.jpg)
18K+ Views
In this tutorial, we will learn how to add a number of days to a JavaScript Date object. Here we will discuss two methods which are following. Using the setDate( ) Method Using the getTime() Method Using the setDate( ) Method JavaScript date setDate() method sets the day of the month for a specified date according to local time. Syntax Its syntax is as follows − Date.setDate( dayValue ) Here dayValue is an integer from 1 to 31, representing the day of the month. Approach To add a number of days to the current date, first we ... Read More
![Krantik Chavan](https://www.tutorialspoint.com/assets/profiles/13545/profile/60_126883-1512724834.jpg)
531 Views
To use a variable number of arguments to function, use the arguments object.ExampleYou can try to run the following code to implement arguments to a function in JavaScriptLive Demo function functionArgument(val1, val2, val3) { var res = ""; res += "Expected Arguments: " + functionArgument.length; res += ""; res += "Current Arguments : " + arguments.length; res += ""; res += "Each argument = " for (p = 0; p < arguments.length; p++) { res += ""; res += functionArgument.arguments[p]; res += " "; } document.write(res); } functionArgument(20, 50, 80, "Demo Text!","Hello World", new Date())
![Anjana](https://www.tutorialspoint.com/assets/profiles/13774/profile/60_78029-1512648681.jpg)
169 Views
ExampleLive Demo $("a").click(function() { $("html, body").animate({ scrollTop: 0 }, "slow"); return false; }); TOP OF PAGE This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is ... Read More
![Shubham Vora](https://www.tutorialspoint.com/assets/profiles/485898/profile/60_1456867-1657516792.jpeg)
2K+ Views
In this tutorial, we will learn how to use setInterval function call in JavaScript. The setInterval() method in JavaScript evaluates an expression at intervals. It is used to perform the repetitive tasks or operations that need to be performed in a specific time interval. For example, it calls a function repeatedly in a fixed time delay to perform the task. The window interface offers this method. This method returns an interval id that uniquely identifies the interval, allowing you to remove it later by executing the clearInterval() method. Users can follow the below syntax to use the setInterval function. Syntax ... Read More
![Shubham Vora](https://www.tutorialspoint.com/assets/profiles/485898/profile/60_1456867-1657516792.jpeg)
15K+ Views
This tutorial teaches us to format numbers as a dollar currency string in JavaScript. Now, the question arises that why we need to format the numbers as a dollar currency string? Well, the answer is here. Users can think about the scenario where they are developing an eCommerce website or application and must show product prices to the customers. What if they render product prices like 2500 and $2500? The second one looks better as ‘$’ represents the USD currency and is the standardized way to show off the USD currency. Also, second approach is more understandable.Below, we have given ... Read More