Im trying to make an employee card who gets a file from a <input type="file"/>
push this file to an array and display it as a “profile picture”.
html:
<label for="formFileLg" class="form-label"></label>
<input class="form-control form-control-lg" id="Img" type="file">
Js- push the file in the array:
function addEmployee() {
employees.push({
name: Name.value,
age: Age.value,
**img: Img.value**
})
}
Js- display the file:
<img src="${employees[i].img}" class="bd-placeholder-img card-img-top" width="100%" height="225" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Placeholder: Thumbnail" preserveAspectRatio="xMidYMid slice" focusable="false"/>
what do I need to addchange?