added usage examples in javascript