Improve JS example