Yeah, that confuses a lot of people. It is because without it, JS will assume that it is a code block and not an implicit return of an object literal.
There is some discussion here. Take a look at that and check back if that doesn’t clear it up.
Yeah, that confuses a lot of people. It is because without it, JS will assume that it is a code block and not an implicit return of an object literal.
There is some discussion here. Take a look at that and check back if that doesn’t clear it up.