Async Missing Before Statement Javascript Substring From Right