I am using node version 12.22.6.
I don't understand, how this code is wrong.
I'm probably missing some important basic thing, but just cannot figure it out.
const change_vars = (var) => {
console.log(var + " is a " + typeof(var) + "\n");
}
const variables = [
42,
"42",
{number: 42},
{},
true,
undefined
]
variables.forEach(var => change_vars(var));
node vars.js
$ SyntaxError: Unexpected token 'var'