title: Return accessed property name (key) from object
body: <p>Is it possible in Javascript/Typescript to write a function that returns the arguments name/key as string?</p>
  
  <pre><code>function foo(arg) {...}
  
  let user = new User();
  foo(user.userId) // =&gt; returns string: "userId"
  foo(user.name) // =&gt; returns string: "name"
  </code></pre>
  
  <p>For my  purposes it would be also okay if the function could return the whole expression, means:</p>
  
  <pre><code>foo(user.userId) // =&gt; returns string: "user.userId"
  foo(user.name) // =&gt; returns string: "user.name"
  </code></pre>