Below are 2 ways of declaring javascript functions.
Method 1:
function pollingLoop(req, res) {
// Function Body
}
Method 2:
var pollingLoop = function() {
// Function Body
}
What is the difference between the 2 functions?
Below are 2 ways of declaring javascript functions.
Method 1:
function pollingLoop(req, res) {
// Function Body
}
Method 2:
var pollingLoop = function() {
// Function Body
}
What is the difference between the 2 functions?