2
I have the following object:
let obj = {};
If I try to validate obj.length
return me a undefined
, then I resorted to the Object.Keys alternative.. Object.keys(obj).length
.. solved my problem.. but I wonder if there are any alternatives to this? some native javascript function.. sei la!
Thank you!
I don’t know if it helps you, but in CSS it has a native "function" for that, it calls
:empty
[]s– hugocsl
In my case it is not possible to use CSS for this validation..
– wDrik