Friday, 12 May 2017

node.js class SyntaxError: Unexpected identifier

I write my class like that on node

class hello {
 function helloworld(){

       console.log('helloworld');


   }



};

but when I run my server i get this error

SyntaxError: Unexpected identifier

function helloworld(id){ ^^^^^^^^^^

SyntaxError: Unexpected identifier



via dark night

No comments:

Post a Comment