Exécuter
❯
Exécuter le code
Ctrl+Alt+R
Enregistrer le code
Ctrl+Alt+A
Changer d'orientation
Ctrl+Alt+O
Changer de thème
Ctrl+Alt+D
<!DOCTYPE html> <html> <body> <h2>JavaScript les variables const ont une portée de bloc</h2> <p id="demo"></p> <script> const x = 10; // Ici x est 10 It seems that the text you provided is incomplete. Please provide the full text you would like to have translated, and I will be happy to assist you! const x = 2; // Ici x est 2 } // Ici x est 10 document.getElementById("demo").innerHTML = "x est " + x; </script> </body> </html>