I bang my head against the wall with an understanding of asynchrony.
- Please tell me, is it possible to achieve asynchrony in JS without using timers (setTimeout)?
- In theory, this is the same thread, pulling on which we can write asynchronous code?
- And as I understand it, writing callbacks without using a timer is not advisable, because asynchrony will be lost?
Can you give an example of asynchronous code without using timers, promises, etc.?
Answer 1, authority 100%
Timers are just an example of an asynchronous call. There is synchronous execution – when they wait for the result of executing some function before starting another job. And there is asynchronous, when, accordingly, they do not wait, and begin to do something else