programming-examples/js/Object/Print all the methods in an JavaScript object.js
2019-11-15 12:59:38 +01:00

8 lines
202 B
JavaScript

function all_properties(obj)
{
return Object.getOwnPropertyNames(obj);
}
console.log(all_properties(Math));
console.log(all_properties(Array));