learning to use javascript library