diff --git a/2727-is-object-empty/2727-is-object-empty.js b/2727-is-object-empty/2727-is-object-empty.js new file mode 100644 index 0000000..9807602 --- /dev/null +++ b/2727-is-object-empty/2727-is-object-empty.js @@ -0,0 +1,8 @@ +/** + * @param {Object|Array} obj + * @return {boolean} + */ +var isEmpty = function(obj) { + let s = JSON.stringify(obj) + return s === "[]" || s === "{}" || s === "" +}; \ No newline at end of file