Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

console.time

console.time('factorial');

const number = 10;
let result = 1;
for (let i = 1; i <= number; i++) {
    result *= i;
    console.timeLog('factorial');
}

console.log('factorial result', result);
console.timeEnd('factorial');
Source by dev.to #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
3+5 =