0

How to add eventListeners the oop way in es6

I'm working on a project currently and i don't like how my JavaScript is messed up all over with functions, i tried to implement things using es6 classes but i got stuck when i had to listen to events, when i create a function in the class i get an error saying ' Unexpected token "}" '....can anyone help pls?........Thanks in advance

15th Jun 2018, 12:20 AM
Ben Acq
Ben Acq - avatar
3 Réponses
+ 4
As Mohamed said before: it is recommended that you share your code here. That way it's much easier to help you. Currently it is quite complicated to know why you get that error.
15th Jun 2018, 1:56 AM
Mickel
Mickel - avatar
15th Jun 2018, 12:58 PM
Ben Acq
Ben Acq - avatar
0
Thank you very much sir
15th Jun 2018, 2:10 PM
Ben Acq
Ben Acq - avatar