I was testing a function out to see what happens when it's parameters are null and decided to put an else statement with it. To my surprise, it did not log the parameters that I have passed, it's logging something else entirely. Maybe someone can shed some light on this, here's the code:
function testing(o) {
if (!o) {
return "Sorry, looks like you need to pass an argument.."
} else {
return o;
}
}
console.log(testing(02034));
//logs 1052
What's going on here?