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.