I have a problem with this task, the console shows the result right way, but the status still shows that its failed.
helper.js :
export const isKeyPresent = (obj, key) => {
let objKey = Object.keys(obj);
for (let i=0; i<objKey.length; i++){
if (objKey[i] === key) {
return true;
} else {
return false;
}
};
}
- The function isKeyPresent should test if the object has certain key -- This one is still red