I am reading an ebook, which is about ReactJs,I want to run commands in the same page console but if redeclare the same variable it showing me variable has already been declared
for ex:-
var pizza = true
pizza = false
console.log(pizza)
when i declarce const it show's me
const pizza = true
pizza = false
error:-
Uncaught SyntaxError: Identifier 'pizza' has already been declared
I searched and used these commands but it is not working
CLTRL + L
console.clear()
;
window.clear = clear
clear()
Can anyone can tell me how to refresh console without refreshing the page