in class work for javascript