I have a JavaScript object, is there a built-in or accepted best practice way to get the length of this object?(我有一个JavaScript对象,是否有内置的或公认的最佳实践方法来获取此对象的长度?)
const myObject = new Object();
myObject["firstname"] = "Gareth";
myObject["lastname"] = "Simpson";
myObject["age"] = 21;
ask by Gareth Simpson translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…