Why return the value in the setter?

Im in the Meal Maker Project in codeacdemy and the 6th task was this

So my question is… why are we returning the value inside the setter?

    set meal(mealToCheck){
      if(typeof(mealToCheck)==='string') return this._meal= mealToCheck;

Considering if i do console.log(menu.meal); it wont work unless i do a getter as well, so whats the use of the return in this setter?

Returning the value inside the setter is how the value this._meal is set. If we didn’t return it, we wouldn’t be setting anything.

since when??? why cant we just use the normal assigning notation

for example

let a = 5;

a = 6;

i dont need to to say “return a = 6”

Yeah, you’re pretty much right. Setters aren’t supposed to have returned values.