JSFiddle - React, Tailwind, and code Playground

by pollo

JavaScript

function swap (a, b){
    var temp = a;
    a = b;
    b = temp;
}

var x = 1, y = 2;

swap(x, y);

alert(x);