Async keeps the chef free
The same hash, but async. Does the timer have to wait this time?
const crypto = require('node:crypto');crypto.pbkdf2('secret', 'salt', 200000, 64, 'sha512', () => console.log('hash done'));setTimeout(() => console.log('timer'), 0);console.log('sync done');1. Predict the output
Tap the lines in the order you think they print.
- 1…
- 2…
- 3…