JavaScript Math Object Math Object The Math object allows you to perform mathematical tasks. Math is not a constructor. All properties/methods of Math can be called by using Math as an object, without creating it. Syntax var x = Math.PI; // Returns P…
javascript nested object merge deep copy Object reference type function namespace(oNamespace, sPackage) { // deep copy let res = oNamespace; const arr = sPackage.split("."); // ["a", "b", "c", "d"] const…