Skip to content
This repository was archived by the owner on Oct 14, 2020. It is now read-only.
This repository was archived by the owner on Oct 14, 2020. It is now read-only.

JavaScript does not recognize the ** exponential operator #541

@JB-Walker

Description

@JB-Walker

MDN Web Docs - JavaScript - Arithmetic operators

When this simple test function was executed in the 'Write Number in Expanded Form' kata the exponential operator was not recognized and it resulted in a syntax error:

function expandedForm(num) {
return (2 ** 3);
}

STDERR:
[eval]:8
return (2 ** 3);
.....................^ {note: dots added to correctly position caret}
SyntaxError: Unexpected token *
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Object. ([eval]-wrapper:6:22)
at
at evalScript (bootstrap_node.js:353:27)
at run (bootstrap_node.js:122:11)
at run (bootstrap_node.js:389:7)
at startup (bootstrap_node.js:121:9)
at bootstrap_node.js:504:3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions