[js] compiler: support 'return' statement
[js] compiler: discard unused statement result when not returning it