Home  >  Article  >  Web Front-end  >  How to use the console[''] input method in JS

How to use the console[''] input method in JS

php中世界最好的语言
php中世界最好的语言Original
2018-06-02 09:57:324317browse

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

is displayed on the small 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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn