Home >Web Front-end >JS Tutorial >How to use the console[''] input method in JS
This time I will show you how to use the console[''] input method in JS, and the precautions for using the console[''] input method in JS. What are the practical cases? Let’s take a look. take a look.
1. Console.log is the most commonly used input method, normalized output statement, and also has print placeholder integer (%d||%i), floating point number (%f ), object (%o), character (%s);
2. Console.error outputs an error statement
3. Console.info outputs an information statement
4. Console.warn outputs a warning statement
5. Console.dir can view the information in the statement
6. Console.group input group
7. Console.assert determines whether the parameters are true (== means the values are the same, === means the values and types are the same)
8. console.trace ;Follow the clues and trace the function trace
9. Console.time records the loading time
10. Console. Profile performance analysis (the number of times the page is refreshed per second) tells you that I can’t, haha,
I won’t discuss other methods for the time being. Where does the discussion come from? So much underfined output
I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the PHP Chinese website!
Recommended reading:
Node.js console output log file example analysis
How to operate jQuery to realize the mouse sliding over the product The corresponding large picture
The above is the detailed content of How to use the console[''] input method in JS. For more information, please follow other related articles on the PHP Chinese website!