remove duplicate declaration of var and locally scope option in forEach.