fork download
// your code goes here
var swap = (function (name_a, name_b){
  return function swp(){
    let t = eval(name_a);
    t_name = Object.keys({t})[0]
    eval(name_a + " = " + name_b)
    eval(name_b + " = " + t_name)
  }})()
var x=4
var y=7
swap(Object.keys({x})[0],Object.keys({y})[0])
console.log(x)
console.log(y)
console.log("doesnt work")
Success #stdin #stdout 0.02s 16860KB
stdin
Standard input is empty
stdout
4
7
doesnt work