Given the following JavaScript:
var someFunction = function(id) { //do some stuff var modifyId = function(id) { //do some stuff outer.id = id;
var someFunction = function(id) { //do some stuff var oid = id; var modifyId = function(id) { //do some stuff // you can access the outer id via the oid variable } }
But, yes, you should just rename one of the formal parameters.