Very useful front-end debugging functions console. log (), chromeconsole debugging

Source: Internet
Author: User

Very useful front-end debugging functions console. log (), chromeconsole debugging

Use console. the log function is very useful for front-end debugging, but its usage depends on the browser. We can use this function to test whether our data is array, String, object or other data, this greatly facilitates debugging.

The following is my test example:


Then we use a browser for access. The following result is displayed:

We can input any data. I entered 1312 and here. Click F12 on the keyboard to bring up the browser developer tool and click the button to test the function.

The following result is displayed:


In this case, we can see the data structure in the console. The first line is an object list, which is an array. Each element of the array is an input

Two or three rows are the data in the input.

The third line is that I tested it like this, so we can see the error.

Therefore, using this function is very convenient for us to analyze front-end data.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.