So we can modify variable values, but can we reassign variables to different data types? Like changing a variable with a string to a variable with a number or vice-versa?
Yes, you can. Remember, you cannot reassign variables that were defined as a
const, but you can reassign variables that were defined with a
let. So long as you do this, you can reassign variables to whatever data types you want, regardless of what you initially defined the variable as. Example: