0

Question about "return"

So I've been wondering about this piece of code I encountered in a challenge. function func(x,y){ return x; return y; return x-y; } func(6,2); What's the output?

18th Dec 2016, 6:54 AM
Alex
Alex - avatar
1 Respuesta
+ 6
6. When a return is called, it ends the function.
18th Dec 2016, 6:59 AM
Nahuel
Nahuel - avatar