Skip to content

Advise against multiple assignment in var declaration #221

@hkdobrev

Description

@hkdobrev

I'd suggest to include a section in the guide explaining the scoping problems of this:

function foo() {
    var a = b = c = 1;
}

and to advise against it.

See http://stackoverflow.com/questions/1758576/multiple-left-hand-assignment-with-javascript

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions