When translating code from PHP to Javascript it is easy to miss that JS use + and PHP use . as glue between strings.