let email =Symbol();
let Employee = {
name : "rajesh",
phone :9800000000,
[email] : "rajesh@gmail.com"
};
let allKeys = {
keyss : Reflect.ownKeys(Employee)
};
console.log(allKeys.keyss);
let privateKeys = {
p : Object.getOwnPropertySymbols(Employee)
};
console.log(privateKeys.p);
let publicKeys = {
pu : Object.getOwnPropertyNames(Employee)
};
console.log(publicKeys.pu)
module.exports = {Employee, allKeys, privateKeys, publicKeys}
**I tried this code in hacker rank for past few days but not passing, I cannot resolve it by my own can any one help me.. The question is:
Create an object Employee with properties:
name as "rajesh" phone as 9800000000, symbol "email" as "rajesh@gmail.com".
After creating the object, display:
All the keys of object "employee"
Only private keys (symbols)
Only public keys (non symbols)**