Javascript console.log() Method display object

Introduction

Write an object to the console:

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.log(myObj);
</script>/*from w w w  .  j  a  va2 s  . c  o m*/

</body>
</html>



PreviousNext

Related