+ 1
Bug, or performance.now() is not supported in code playground? [Solved]
So I was trying to make a function that finds Nth Fibonacci number and displays the time it took to do the calculation, but it gives me an error "performance is not defined" I've used the same code on PC with Node.js and it works without giving any error. https://code.sololearn.com/c8zt9p8b3sIz/?ref=app
2 Respuestas
+ 4
// Add it be4 your code
const {
performance,
PerformanceObserver
} = require('perf_hooks');
+ 2
Node.js v17.7.0 documentation
https://nodejs.org/api/perf_hooks.html#performancenow