I am getting Syntax error in console which points to this line, probably due to defining variables with` let` 