js refaction