Here is my code:
function renderMinum() {
document.getElementById("targetMinum").innerHTML = "string";
}
renderMinum();
<section>
<div class="box-container text-center">
<h1>Drink Tracker</h1>
<br>
<div class="container">
<div class="row">
<div class="col">
<h5>Kebutuhan minum hari ini</h5>
<h3 id="targetMinum" class="box-target">0 <span>ml</span></h3>
</div>
<div class="col">
<h5>Progres minum hari ini</h5>
<h3 id="progressMinum" class="box-target">0 <span>ml</span></h3>
</div>
</div>
</div>
<!-- <input type="button" onclick="" value="Sudah minum" class="btn btn-success"> -->
</div>
</section>
I want to change the value with id="targetMinum" with a string. However the value inside of the HTML is not changing, and when I try to console.log() the innerHTML, it is also not showing in the console.