1

While I was doing a test I came across below function. can someone describe this f and g status. Is there any special scenarios we have to use this.

var f = function g(){ return "confused"; };
bula
  • 8,719
  • 5
  • 27
  • 44
  • where do these variables occur? – david Jul 20 '18 at 09:25
  • This is a function expression, and `g` is unnecessary: *"Can be omitted, in which case the function is anonymous. The name is only local to the function body"* (https://developer.mozilla.org/en-US/docs/web/JavaScript/Reference/Operators/function). – Gerardo Furtado Jul 20 '18 at 09:26

0 Answers0