I attempted to execute a class in ECMA2015 but encountered the following error:
class Task {
constructor(name)
{
this.name=name;
this.completed = false;
};
}
I received the error below:
class Task {
^^^^^
SyntaxError: Unexpected reserved word}
Note: I am currently using the latest node version 0.12.14 and have also tried using
node --harmony <myfilename>
node --harmony_modules <myfilename>
and other methods, but nothing seemed to help. Can someone please offer assistance?