Javascript console.warn() Method display object

Introduction

Use an object as the warning message:

Press F12 on your keyboard to view the message in the console view.

View in separate window

<!DOCTYPE html>
<html>
<body>
<script>
var myObj = { firsname : "CSS", lastname : "HTML" };
console.warn(myObj);
</script>/*from  ww  w .  ja v a  2 s  .co m*/

</body>
</html>



PreviousNext

Related