JSFiddle - React, Tailwind, and code Playground
by vinodlouis
JavaScript
const objPerson = {
name: "Mohit Kumar",
phone: 9999999999,
isPresent: true,
dob: new Date(1990, 07, 01),
}
function myStringnify(obj) {
return JSON.stringify(objPerson);
}
const customStr = myStringnify(objPerson);
const jsonStr = JSON.stringify(objPerson);
console.log(customStr === jsonStr ? "Success" : 'Error', jsonStr, customStr);