just some bikeshedding ... sry - your answers are all very good! On Wednesday, March 5, 2014 6:40:16 PM UTC+1, mike wrote: > > > By default, if you run this in Ruby, you will get what you expect. It > will open the file, then read its contents. Javascript won't. It will > issue the command to the operating system to open the file, then attempt to > read the contents whether the file has finished opening or not. In > javascript, you have to program the second statement as a function callback > to the first statement. >
please don't interchange JavaScript with node.js. What you mean here is node.js - not JavaScript. JavaScript (ECMA Script) is not able to interact with the os in any way but node.js is. Just wanted to make that clearer ... Cheers Andy -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/d025672b-b19d-424d-b334-f1e5219adf06%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.

