Pregunta de entrevista de Semrush

How to write down a function in JS which will send API call and cancel it if it didn't finish in 5 sec.

Respuesta de la entrevista

Anónimo

14 dic 2024

Promise.race() is the answer