can you explain me 3. How its undefined ?
Shripad Somayaji
11

Please refer this URL http://www.bradoncode.com/blog/2015/08/26/javascript-semi-colon-insertion/.

Javascript automatically inserts semicolon at the end of return statement, hence it will return the undefined value. however below code will return proper response object.

return{
a : 0
}
One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.