Javascript console.warn() Method display array

Introduction

Use an Array as the warning message:

var myArr = ["Orange", "Banana", "CSS", "HTML" ]; console.warn(myObj);

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.warn(myArr);
</script>//from  w ww.jav a 2  s . c  o m

</body>
</html>



PreviousNext

Related