test(1, {tmp: 20}) test({test: 'Ok'}) // function test(v, o) { if (typeof v === 'object') { o = v v = 100 } console.log(v, o) }