Return Early Pattern for Functions this exercise

Return Early Pattern for Functions this exercise
0.0 0

#1

I can`t understand what return I must to use!Help me, please!


#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;
  }
}

#3

Thnx I decided this problem)