Skip to content

Instantly share code, notes, and snippets.

@kozielArt
Created February 7, 2019 10:38
Show Gist options
  • Save kozielArt/24e1e0c044ea8c3b39c78b7710549b8a to your computer and use it in GitHub Desktop.
Save kozielArt/24e1e0c044ea8c3b39c78b7710549b8a to your computer and use it in GitHub Desktop.
Interview question 3
function f (arg) {
var name = arg[0];
var val = arg[1];
console.log(name, val);
};
function g (arg) {
var n = arg.name;
var v = arg.val;
console.log(n, v);
};
function h (arg) {
var name = arg.name;
var val = arg.val;
console.log(name, val);
};
f([ "bar", 42 ]);
g({ name: "foo", val: 7 });
h({ name: "bar", val: 42 });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment