10
rated 0 times
[
12]
[
2]
/ answers: 1 / hits: 144492
/ 13 Years ago, thu, july 7, 2011, 12:00:00
In chrome's console, when I type:
> switch(3){default:OK}
OK
So looks like the switch statement has a return value. But when I do:
> var a = switch(3){default:OK}
It throws a syntax error Unexpected Token switch
Is it possible to capture the return statement of the switch?
More From » javascript