In the Node.js application, an asynchronous function accepts a callback as the last parameter and the callback function accepts the error as the first parameter. Let's review the previous example. Create a text file named input.txt with the following content:
QTM la trang Web huong dan cac bai lap trinh hoan toan mien phi cho tat ca moi nguoi !!!!!
In this example, I use fs Module to handle File I / O operations (I'll cover in the next chapter). First, create a js file named main.js as follows:
Here, fs.readFile () is an asynchronous function for the purpose of reading files. If there is an error while reading the file, the err object will contain the error, otherwise the data will contain the contents of the file. The readFile function transmits err and data to the callback function after the file reading process has completed, and finally prints the content.
Let's get married QTM is a Web page that contains all the scripts Welcome to the world !!!!!!
the for ... in loop is used to iterate over the properties of an object. when we haven't discussed the object yet, you may not feel comfortable with this loop. but once you understand how objects work in javascript, you will find this loop very useful.
javascript provides high control to handle loop commands and switch commands. there may be a situation when you need to exit the loop without having to go to its endpoint. there may also be situations when you want to jump over a part of the code block and start the next loop.
many people have been using notion for brainstorming for years, so it's interesting to see if loop can replace it as they move deeper into the microsoft ecosystem.
the please wait for the gpsvc loop error in windows is an annoying problem that can cause the system to get stuck at shutdown. this loop is related to group policy client service (gpsvc).
the while loop gives you the ability to execute a set of repetitive commands until certain conditions occur. it is often used when you need to manipulate iterative variable values.
the while loop is perfect for the situation where you want to execute a set of commands while some conditions are true. sometimes you need to execute a set of commands until a condition is true, then you need to use a until loop.