Hello everyone, i need help with something. What you’re seeing below is my code block, i run it to the console,yet the console ony show curly braces{} as the output.
1- can you tell me what my mistakes are? And thank you very much
const logMyBirthDate = new Promise((resolve,reject) => {
const myBirthDate = {first: 2005, _$Second: 7, _Last: 27};
if (myBirthDate.hasOwnProperty(_$Second)) {
resolve("myBirthDate object possess a property that's called as _$Second");
} else {
reject("myBirthDate doesn't possess property a that's called _$Second");
};
});
console.log(logMyBirthDate);
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Safari/605.1.15
Challenge: ES6 - Complete a Promise with resolve and reject
Link to the challenge: