📜  Object.Values() javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:34.877000             🧑  作者: Mango

代码示例3
const object1 = {
  a:"somestring",
  b: 42,
  c: false,
  d: function test()
};

console.log(Object.values(object1));
// expected output: Array ["somestring", 42, false, function test()]
const object2 = "test";
console.log(Object.values(object2));
// expected output: Array ["t","e","s","t"]