add sample js code