When creating a x = new Date() object, if you put it into console.log(x) a string will be output.
x = new Date()
console.log(x)
Is there a way to make a custom object that w
You can convert most of the objects to string as follows
String(object)
like
x = String(new Date()); // now x is a string
Similarly
x = Boolean(0); // wil return an object x = String(Boolean(0)); // will return a string