I am getting this error in console.
Uncaught ReferenceError: Invalid left-hand side in assignment
at changeFirstDate (script.js:156)
at HTMLInputElement.oninput (index.html:97)
I double checked my codes and I can't find the problem
here is the HTML:
<p>Type First Date </p>
<input id="typefirstdate" type="text" placeholder="(example: June 1 2018)" oninput="changeFirstDate()">
<p id="firstDate"></p>
and here is the JS :
document.getElementById('typefirstdate').addEventListener('input', changeFirstDate);
function changeFirstDate() {
let firstDate = document.getElementById('typefirstdate').value;
document.getElementById('firstDate') = firstDate;
}
I have read other questions similar to my problem but there seems no answer to this type of questions.