added JavaScript code to README.md