I am trying to use arrow function (method) inside JS Class, using new syntax but i get error "Uncaught SyntaxError: Unexpected token = "
class Images{
constructor(elements){
this.elements = elements;
}
nextClick =()=>{
//some code
}};
Everything else is working fine. Arrow functions outside the class are working perfect.