Just discovered some weird error that reads:
Uncaught ReferenceError: symbol is not defined
Code in question:
const symbol='tNEOUSD';
function get_position(symbol=symbol){
console.log(symbol);
}
get_position();
How come it's not defined? That's a really weird!
On the other hand if I use a different parameter name it works just fine:
const symbol='tNEOUSD';
function get_position(sym=symbol){
console.log(sym);
}
get_position();
Does anyone know why this happens?