Entering the following in the console:
Should yield no output, because it is not an expression.
Entering the following, however:
Should output undefined, because it is an expression with an undefined value.
Both code fragments return undefined when passed to eval, so we will need to do something smarter to distinguish between them (I’m guessing esprima might be able to help us tell the difference).
Entering the following in the console:
Should yield no output, because it is not an expression.
Entering the following, however:
Should output
undefined, because it is an expression with an undefined value.Both code fragments return
undefinedwhen passed toeval, so we will need to do something smarter to distinguish between them (I’m guessingesprimamight be able to help us tell the difference).