On the Chrome console, you can get the return value of the last expression
> 1+1; 2+1;
< 3
How to implement this function in javascript?
$expressions = '1+1; 2+1;' // from user input
new Function($expressions).call() // return 3, not 2
Can only be inserted in the last expression return statement?