added javascript code sample