added js example for platform interaction