Created
February 7, 2019 10:38
-
-
Save kozielArt/24e1e0c044ea8c3b39c78b7710549b8a to your computer and use it in GitHub Desktop.
Interview question 3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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