1console.log("%c%s",
2 "color: red; background: yellow; font-size: 24px;",
3 "WARNING!");
1console.log('log-message'); // Outputs a normal information log to the console window
2console.warn('warn-message'); // Outputs warning in the console window
3console.error('error-message'); // Outputs error in the console window
4console.table('table-message'); // Outputs a table of all the object properties
1<script>
2 console.log(x); // return undefined
3 var x="hello js";
4 console.log(x); // return "hello js"
5</script>
6