how to stringify json in js

JavaScript
var obj = { name: "John", age: 30, city: "New York" };
var myJSON = JSON.stringify(obj);var Num=[1,2,3,4,5,6]
console.log("The Numbers Are "+JSON.stringify(Num))
//output= The Number Are [1,2,3,4,5,6]

Source

Also in JavaScript: