Example code for javascript