Update javascript.md

added promises