add sample for javascript