Skip to content

Distinguish between non-expression statements and expressions with undefined values #1333

@outoftime

Description

@outoftime

Entering the following in the console:

var i = 1

Should yield no output, because it is not an expression.

Entering the following, however:

window.nothingHere

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).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions