3

one of the things I love most about Ruby is how easy it is to learn it. If I want to discover something new, I can have irb and ri open and just find new ways to do things easily.

I am finding that it's not as easy to do this in javascript.

I like being able to use the developer tools or Firebug as a REPL, but I'm not finding quick reference material for offline usage or for a slow connection.

So... is there anything for javascript, that is like Ruby's ri, so I can quickly learn. I'm not into always having to find a desk reference or wait 5 seconds while a w3schools.com page loads just so I can experiment with manipulating the DOM...


There is a comment below requesting an explanation of what irb and ri are. irb is an interactive ruby shell. ri is an interactive ruby reference you can call from the command prompt.

David West
  • 2,256
  • 6
  • 32
  • 62
  • 1
    For the non-ruby community, what does `irb and ri` exactly do? – Nope Apr 05 '13 at 19:24
  • 3
    Check out this answer: http://stackoverflow.com/a/9502497/74757. The gist is that you can download the content of the MDN (Mozilla Developer Network) reference for JavaScript which is pretty darn good. – Cᴏʀʏ Apr 05 '13 at 19:24
  • 2
    An issue with JavaScript is that there are many implementations across different browsers, so you can't really download JavaScript like you can with Ruby. @Cory's answer is good though, Mozilla has a great complete reference of JS features. I'm not sure about `irb`. – Cheezey Apr 05 '13 at 19:25
  • As a side-note, [**w3schools.com**](http://w3schools.com) `===` [**w3fools.com**](http://w3fools.com). Always go to a more W3C compliant documentation site like the [**MDN Documentation**](https://developer.mozilla.org/en/docs/JavaScript) – Nope Apr 05 '13 at 19:28
  • 2
    For a quick cheat sheet reference, try: http://overapi.com/javascript/. – Chase Apr 05 '13 at 19:29
  • @Chase: +1, that is a very nice looking site. – Nope Apr 05 '13 at 19:30
  • @Cory: there was a link on the stackoverflow post for https://github.com/rgarcia/dochub it looks great. Thanks! – David West Apr 05 '13 at 19:37

2 Answers2

0

You're looking for node.

Type node in the terminal prompt and it'll do the javascript version of ruby's irb.

[~ :> node

  • I was looking for a documentation tool, not a REPL. I mentioned `ri` in my question in respect to what I was trying to find the JS equivalent for. I'm not looking for an equivalent to `irb`. Thanks anyway! – David West Jan 19 '18 at 18:35
-1

After some time, I really have to recommend DocHub (https://github.com/rgarcia/dochub)

It's a node app that provides scrapes docs from the web and keeps them locally to make things speedy or let you use them offline.

David West
  • 2,256
  • 6
  • 32
  • 62