Friday, May 17, 2024
 Popular · Latest · Hot · Upcoming
164
rated 0 times [  169] [ 5]  / answers: 1 / hits: 106654  / 13 Years ago, fri, may 20, 2011, 12:00:00

From the node REPL thing,



> d = {}
{}
> d === {}
false
> d == {}
false


Given I have an empty dictionary, how do I make sure it is an empty dictionary ?


More From » dictionary

 Answers
5
function isEmpty(obj) {
return Object.keys(obj).length === 0;
}

[#92136] Thursday, May 19, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
taylert

Total Points: 627
Total Questions: 91
Total Answers: 108

Location: Mayotte
Member since Mon, Sep 12, 2022
2 Years ago
taylert questions
;