KISHOR 1988
Coder
[CODE lang="javascript" highlight="1,3"]const timeFuncRuntime = funcParameter => {
let t1 = Date.now();
funcParameter();
let t2 = Date.now();
return t2 - t1;
}
const addOneToOne = () => 1 + 1;
timeFuncRuntime(addOneToOne);[/CODE]
Why is written line 3 " funcParameter(); " in block code of function???? Is line3 parameter ???? Why is it return with parentheses , though it is parameteras as per line1???
let t1 = Date.now();
funcParameter();
let t2 = Date.now();
return t2 - t1;
}
const addOneToOne = () => 1 + 1;
timeFuncRuntime(addOneToOne);[/CODE]
Why is written line 3 " funcParameter(); " in block code of function???? Is line3 parameter ???? Why is it return with parentheses , though it is parameteras as per line1???