JS Function override example