added javascript code to readme