Hello, @Coderslang_Master I'd like some assistance with task 185.
code below, by my understanding I should loop through the obj, check if a key is present, and return true/false.
How may I approach this differently?
export const isKeyPresent = (obj, key) => {
for (key in obj) {
if ('name' in obj) {
return true;
} else {
return false;
}
}
};
output:
true
true