how to deal with js