added JavaScript examples