Javascript Variables- const
✓ Published1🌍 Public
This example demonstrates JavaScript's `const` keyword by attempting to reassign a constant variable, which triggers a runtime error. The page displays the text "Hello HTML" prominently with a font size of 13em, styled via CSS. The HTML structure includes a script tag where a `const` variable named `hotel` is initialized to 'Royal' and then reassigned to 'Rainbow', illustrating that constant variables cannot be changed. No external libraries are used; the example relies solely on native HTML, CSS, and JavaScript to showcase this fundamental language behavior.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed