When formatting or converting some parameters of a function in JavaScript, I usually create private variables of the same name (private variables with the same names as function parameters):
function myFunction(param) {
var param = Math.floor(param);
}
Question: Is it considered bad practice? Is there any flaw that I should worry about?
source
share