Update README.md

updated the readme with new js snippet