java script sample code