討厭看落落長的教學文,一心只想馬上行動嗎? Tired of all the tutorials without something simple and quick?
var obj = { "key1": value1, "key2": value2, "key3": value3 }; var length = Object.keys(obj).length; console.log(length); //結果為 3
No comments:
Post a Comment