Answer the question
In order to leave comments, you need to log in
Error running console command in Firefox?
I noticed a strange thing in the Firefox console - the first time it executes the command, and all subsequent times it gives an error. I'll give an example:
let age = prompt('Сколько тебе лет?');
alert(`Тебе ${age} лет!`);
Uncaught SyntaxError: redeclaration of let age
Answer the question
In order to leave comments, you need to log in
Because formally you call something like this
let age = prompt('Сколько тебе лет?');
alert(`Тебе ${age} лет!`);
let age = prompt('Сколько тебе лет?');
alert(`Тебе ${age} лет!`);
Use Console Features var
instead andlet
let
let x;
let x; // ошибка: переменная x уже объявлена
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question