Get the App
SLTechnology News&Howtos  ›  Development  › 

How does console.log output information in the console window

Shulou Source: shulou.com Published: 2022-06-01 06:45:06 10月04日 Update

This article mainly introduces "how console.log outputs information in console window". In daily operation, I believe many people have doubts about how console.log outputs information in console window. Xiaobian consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the question of "how console.log outputs information in console window". Next, please follow the editor to study!

Console

The console.log method is used to output information in the console window. It can accept multiple parameters and connect their results together for output.

Math attribute

E

LN10

LN2

LOG2E

LOG10E

PI

SQRT1_2

SQRT2

For the specific use of the above attributes, please refer to the ES5 standard. Method

Abs

Acos

Asin

Atan

Atan2

Ceil

Cos

Exp

Floor

Log

Max

Min

Pow

Random

Round

Sin

Sqrt

Tan

For the specific use of the above methods, please refer to the ES5 standard. JSON method

Stringify (object): converts the object object to a JSON string and returns it.

Parse (string): converts the JSON string to an object and returns the object.

Sample code:

Console.log (undefined===JSON.stringify ()); console.log (undefined===JSON.stringify (undefined)); console.log ("null" = JSON.stringify (null)); console.log ("111" = JSON.stringify (111l)); console.log ('111' = = JSON.stringify (" 111")); console.log ("true" = = JSON.stringify (true)); console.log (undefined===JSON.stringify (function () {})); console.log (undefined===JSON.parse (JSON.stringify () Console.log (undefined===JSON.parse (JSON.stringify (undefined); console.log (null===JSON.parse (JSON.stringify (null); console.log (111===JSON.parse (JSON.stringify)); console.log ("111l" = JSON.parse (JSON.stringify ("111l")); console.log (true===JSON.parse (JSON.stringify (true); console.log (undefined===JSON.parse (JSON.stringify (function () {}); Number attribute

MAX_VALUE

MIN_VALUE

NEGATIVE_INFINITY

POSITIVE_INFINITY

For the specific use of the above attributes, please refer to the ES5 standard. Global attribute

NaN

Infinity

Undefined

For the specific use of the above attributes, please refer to the ES5 standard. Method

ParseInt

ParseFloat

IsNaN

IsFinite

DecodeURI

DecodeURIComponent

EncodeURI

EncodeURIComponent

At this point, the study on "how console.log outputs information in the console window" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Tags: Output properties methods information standards references learning characters strings objects more help utility next code parameters multiple articles theory knowledge Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Linux Shulou Tech Info NVidia vpn