8

I get what it does, and use it all the time. But funnily enough, I've yet to find documentation that says what "DIR" actually means. "Directory" doesn't seem right.

This is not a "What's the difference between console.log() and console.dir()?" question. It's simply, "What do the letters DIR actually stand for?"

RobertAKARobin
  • 3,933
  • 3
  • 24
  • 46
  • Do not use it all the time. It is non-standard. – BoltKey May 31 '16 at 21:33
  • 1
    Don't think "directory" as in "folder", think "directory" as in "a listing". – Mr. Llama May 31 '16 at 21:34
  • 1
    I think it just means "Directory". Directory is a synonym for index, list, listing, register, catalogue, record, archive, inventory etc. Some of those words might have been a better fit for this function though. – HaukurHaf May 31 '16 at 21:35
  • 4
    This [Q&A](http://stackoverflow.com/questions/11954152/whats-the-difference-between-console-dir-and-console-log) helps a little. Hard to saw what the designer intended, but it seems roughly like a "directory" of attributes of the item being displayed. As others have noted, we in the computer field have gotten used to a narrow definition of "directory" but it really is a more general term. – lurker May 31 '16 at 21:35
  • @BoltKey Don't worry, only for debugging. – RobertAKARobin May 31 '16 at 22:55
  • @HaukurHaf If you submit this as an answer, I'll accept it! – RobertAKARobin Jun 01 '16 at 13:57
  • @RobertAKARobin done :) – HaukurHaf Jun 01 '16 at 14:31

1 Answers1

8

It just means "Directory". Directory is a synonym for index, list, listing, register, catalogue, record, archive, inventory etc. Some of those words might have been a better fit for this function though, like "listing".

HaukurHaf
  • 13,522
  • 5
  • 44
  • 59