Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mustafa-qamaruddin/404d140134a3fe821497f1fbfd4fb2c1 to your computer and use it in GitHub Desktop.
Save mustafa-qamaruddin/404d140134a3fe821497f1fbfd4fb2c1 to your computer and use it in GitHub Desktop.
// pass by reference
var arr = [1,2,3];
function append(_arr)
{
_arr.push(90);
}
append(arr);
console.log(arr);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment