I have a form that collects first name and last name via two div elements:
<div class="form-row">
<div class="col">
<input type="text" class="form-control" id="lastName" placeholder="last name" />
</div>
</div>
<div class="form-row">
<div class="col">
<input type="text" class="form-control" id="firstname" placeholder="first name" />
</div>
</div>
In the script I have the following line
const lastName = document.getElementById('lastName').value;
What I would like to do is produce a constant called fullname which comprises of firstname+lastname
How can I rewrite the line starting with const above to do this?