Skip to content

arguments.length is wrong if there are argument in the function but no arguments supplied #1321

Open
@gfwilliams

Description

@gfwilliams
function abc(p1){
console.log(arguments.length);
}
abc();   

As here: http://forum.espruino.com/conversations/316078

This is due to the way Espruino handles function arguments. We can't just not have an argument because then code inside the function would produce a referenceerror.

I think for now this is something we'll have to live with.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Standards IssueA place where Espruino doesn't conform to the ECMAscript standardlow priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions