I can`t understand what return I must to use!Help me, please!
Return Early Pattern for Functions this exercise
Return Early Pattern for Functions this exercise
0
lincore
#2
There is only one return
. You are supposed to return undefined
. Here is an example for a function that returns null
:
function getNameOf(value) {
if (!value) {
return null;
} else {
return value.name;
}
}