Javascript console.error() Method display array

Introduction

Use an Array as the error message:

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

View in separate window

<!DOCTYPE html>
<html>
<body>
<script>
var myArr = ["Orange", "Banana", "CSS", "HTML" ];
console.error(myArr);
</script>//from   w  ww .  j  a  v  a2 s . co m

</body>
</html>



PreviousNext

Related