programming-examples/js/Object/Print all the methods in an JavaScript object.js

8 lines
202 B
JavaScript
Raw Normal View History

2019-11-15 12:59:38 +01:00
function all_properties(obj)
{
return Object.getOwnPropertyNames(obj);
}
console.log(all_properties(Math));
console.log(all_properties(Array));