Javascript


Apr 09, 2020
25 comments
880
In JavaScript, you can use following two ways to get hidden field value in a form : document.getElementById(‘hidden field id’).value document.formName.elements[‘hidden field name’].value See an example here… function printIt(){ ...
What is the Singleton design pattern?   The Singleton design pattern is a creational pattern that states that one and only one instance of a class would persist in the memory during the application's life cycle. In other words, this design patte...
JavaScript is the official language of all modern web browsers. As such, JavaScript questions come up in all sorts of developer interviews. This article isn’t about the newest JavaScript libraries, common development practices, or any of the new ...
Dec 01, 2016
22 comments
128
Here’s the list of the top 10 best ES6 features for a busy software engineer (in no particular order): Default Parameters in ES6 Template Literals in ES6 Multi-line Strings in ES6 Destructuring Assignment in ES6 Enhanced Object Literals in ...
JavaScript can be a nightmare to debug: Some errors it gives can be very difficult to understand at first, and the line numbers given aren’t always helpful either. Wouldn’t it be useful to have a list where you could look to find out what they m...
Apr 04, 2016
25 comments
789
The solution is to keep count of the number of times the function is called to execute AJAX request and on failed requests recall the function. The retryLimit can be modified to the number to times the AJAX function is called. function callback()...
Apr 01, 2016
24 comments
512
To run server.js, the socket.io file Install nodejs globally. install npm globally go to your project folder and install npm modules npm install connect npm install socket.io Make sure the port your're using is open in the iptables, if not...