Async Missing Before Statement Javascript Substring Syntax