update and use javascript examples