![]() ![]() ![]() Spoiler: JavaScript never really "pauses". Thanks javascript Share Improve this question Follow asked at 17:31 Heavy Rain 57 1 1 4 3 Use setTimeout, look it up. In this post, I'll discuss how you can achieve that and what it really means to "pause" or "sleep" in JavaScript. How can I make my JavaScript wait 0.5 seconds I tried statement1 tTimer (500) statement2 But that was not it. Syntax await expression Parameters expression A Promise, a thenable object, or any value to wait for. It can only be used inside an async function or at the top level of a module. One of those features are Promises, which are probably the most widely used feature in JavaScript after ES5 was released.īut one of the things which JavaScript misses is a way to "pause" execution for a while and resume it later. The await operator is used to wait for a Promise and get its fulfillment value. More and more ideas and features are being ported from different languages and being integrated in JavaScript. And it hasn't been the same since ES5 was released. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |