Answers for "javascript print object pretty"

0

javascript print object pretty

//Prototype JSON.stringify(value[, function [, space]])
var myObject = {"hello": "world", "!": []};
var str = JSON.stringify(myObject, null, '\t');//space may be a string or a number corresponding to the number of space

//What is displayed in the console
{
	"hello": "world",
	"!": [] 
}
Posted by: Guest on October-04-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language