Skip to content

SyntaxError bug : Coding style problem #5437

Closed
@jefftham

Description

@jefftham

i found a bug that node.js stop me the code differently.

Please refer the the following code:-

//no error
var maximum = Math.max(
1,
10);

//error show
var maximum = Math.max(
1
,10);

// error show
var maximum = Math.max(
1,
10
);

I believe the above code should produce the same result, the position of the comma and closing bracket should not affect the result.

However, node.js throw an error message as:-

SyntaxError: missing ) after argument list

I tested the code in node version 0.12.4, no error shown.

Metadata

Metadata

Assignees

No one assigned

    Labels

    replIssues and PRs related to the REPL subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions