Writing classes in JavaScript doesn't give full functionality of an object oriented language, but it at least gives data hiding and encapsulation which are very useful specially when JavaScript is not a strongly typed language. It is very useful in cases when you need to handle multiple objects , instead of having arrays for all kinds of variables and then managing those arrays in methods you c |