Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint
Drag to reposition
Contributed Questions
loader

How to minimize the use of global variables in JavaScript?

I have learned about JavaScript local and global variables. I know why global variables should be avoided, but I have no idea how to achieve the same result using only local variables. My goal is to use JavaScript best practices while coding.

What is the correct way to define global variables in JavaScript?

I want to use global variables correctly in my script. How can I achieve this keeping in mind JavaScript best practices? I do not want to follow the old school way: ,

How and why to avoid global variables in JavaScript?

We all know the usage of both local and global variables are valid. However, at some instances it is quite hard to work with global variables. What are the alternatives available and why it is hard to work with global variables?

Do I need to use a semicolon after every function in JavaScript?

Should a semicolon come after every function? Which of the following is correct? ,

How to implement basic Animation in JavaScript?

I want to animate an image on the web page. Which properties and methods are used in JavaScript to achieve basic animations? On button click, I want to animate the following image on the right: ,

How to check whether a string contains a substring in JavaScript?

The following is my String: , With JavaScript, I want to check whether the above string contains the substring “point” or not? Which method should I use in JavaScript to achieve this?

Why do we use "use strict" in JavaScript?

A new keyword “use strict” introduced in JavaScript. Is it a literal expression? What is the usage of adding a strict mode in a JavaScript program? Will it get declared in the following way inside<script> tag: ,

How to redirect to another webpage using JavaScript?

On reaching a web page on my website, I want the users to redirect to the following external website: , How can I redirect with JavaScript. 

Which equals operator (== vs ===) should be used in JavaScript comparisons

How can I differentiate double and triple equals operator in JavaScript? What will happen when the following is compared using both the operators: ,

How to remove a property from a JavaScript object

What is to be used in JavaScript to remove a property. The following are the values: , On printing the points of the cricketer, I want to show undefined.
1 2 3 4 5 6 7 ... 19 Next
Advertisements
Contribution

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.