javascript static method vs prototype