Iterations in JavaScript Promise
Imagine we have an async task below that needs to be done for several times in sequence. 12345678function asyncJob() { for (var i = 0 ; i < 4;) { console.log(i++); setTi
Imagine we have an async task below that needs to be done for several times in sequence. 12345678function asyncJob() { for (var i = 0 ; i < 4;) { console.log(i++); setTi
Class is a new feature introduced into the new ECMAScript 2015 standard, also known as ES6. I thought it was just a move for the JavaScript to adapt to the Object-oriented world. It may be so, howeve
Sometimes we need to do some asynchronous jobs which may last for a while, like submitting an Ajax POST request. And if there is problem with connection, we may not get response in time as expected.
I am always curious that if a Promise is rejected at any position, will the following then() still be executed? Consider the following codes as an example: 1234567891011121314151617181920212223Promis
I recently created a new site, collecting some useful cheatsheets. But on the page regarding to topic of Markdown, a funny thing happened without giving me any clue of why. There was some empty space
The textbook says in bash scripting, eval plays a role that the expression comes after will be evaluated twice before the final execution. By saying evaluation, it means the variables begining with $
I wrote some codes below:1234<body> <div class="container"> <a href="../index.html" id="return"><button class="btn">Return</button></a> <h1 id="toc_0">Typ
TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) both work in the transportation layer. TCP is a connection-oriented protocol, while UDP is considered as a connectionless protocol
There are a lot of explanations online for distinguishing those two concepts. As in the answers of this question says, Expressions only contain identifiers, literals and operators, where operators i
When I tried to create a two-dimensional array today, I surprisingly discovered that there is no built-in function which can help us to create two-dimensional array in JavaScript. I searched online an