Home >Web Front-end >JS Tutorial >JS+console['']10 output methods (with code)

JS+console['']10 output methods (with code)

php中世界最好的语言
php中世界最好的语言Original
2018-06-04 15:19:492044browse

This time I will bring you 10 output methods of JS console[''] (with code). What are the precautions for using the 10 output methods of JS console['']. The following is a practical case. Let's 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 ), characters (%s);

2, console.error outputs error-formed statements

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 traces

9. Console.time records the loading time

10. Console.profile performance analysis (per second The number of times the page is refreshed (clock refreshes the page) tells you that I can’t,, haha,

Other methods will not be discussed for the time being. What we want to discuss is where so many underfined outputs come from

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:

vue interceptor compatibility processing

How to use Vue to operate DIV

The above is the detailed content of JS+console['']10 output methods (with code). 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