Your call but I would use urlParams[urlParams.length - 1 ] instead of making a new var.