Im new to js and I have an issue,
This code works perfectly fine:
function test(args){
return "12345 - "+args;
}
console.log(test("678910"));
But this code doesn't:
function test(args){
if(args = ""){
}
return "12345 - "+args;
}
console.log(test("678910"));
[args] becomes undefined for some reason and I cant understand why, I suppose it has something to do with context, but I still dont understand why nothing works, help would be really appreciated!