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');