oczor
oczor copied to clipboard
const
some of the JavaScript examples look like this:
var func = function(x, y) {
return x + y + 1;
};
however var is rarely what will be wanted with a function. better would be this:
const func = function(x, y) {
return x + y + 1;
};
or it can be wrapped in a block if needed for the console or a bookmarklet:
{
const func = function(x, y) {
return x + y + 1;
};
}