I can't figure out why we can change a DOM element even if we are declaring it as a constant.If we are not changing it so what are we really doing? thank you in advance.
const button = document.getElementsByTagName('button')[0];
const domElement = document.getElementsByTagName('div')[0];
button.addEventListener('click', e => {domElement.innerText = "how can I be modified even I am const?"});
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>DOM Example</title>
</head>
<body>
<div>change me</div>
<button>Change a DOM element </button>
</body>
</html>