0
I have question in Javascript, what is the function that returns the number of functions are used in the program?
Java script
5 ответов
+ 2
function maths(a, b) {
function sum() {
return a + b;
}
function subtract() {
return a - b;
}
return {sum, subtract}
}
const fns = maths(5,3);
const total = fns.sum();
console.log(total);
const diff = fns.subtract();
console.log(diff);
https://code.sololearn.com/cp7FG0J73kNs/?ref=app
JavaScript and Node.js have the same basic functionality
0
as far as I know there is no such function... at least in web context (don't know if nodejs has such builtin function or if there exist a module to install such function)...
not in ES specifications, in all cases ^^
0
OK thanks for replying.
0
That's means, there is no such function do that in JS right?
0
yes, as far as I know...