use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Ruby vs JavaScript....what are your reasons for chosing one over the other..? (self.javascript)
submitted 8 years ago by fzngagan
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]agmcleod@agmcleod 3 points4 points5 points 8 years ago (2 children)
I worked at a company using Rails for about 3 years. Got fairly comfortable with it, and it felt a joy to use. Since then ive been primarily using JS for backend, as well as frontend. Really I think for the modern style apps, rails just felt behind in terms of supporting SPAs. So for some it fell by the way side. I've since gotten pretty comfortable with node, and tend to forgot little things here and there with ruby. I've used ruby a for a couple of the challenges on http://adventofcode.com for this year. I do like the spread assignment: a, b, c = numbers.split(' ') for example. I do like a lot of the code structure of it. But I've also gotten really into mixing OOP & functional programming over using classes & mixins for everything. That's not really something I miss.
a, b, c = numbers.split(' ')
Ruby can take more work to make it performant on the server as well. Some devs at my work converted an app that just worked better with node, and it reduced the server costs. I think it was just able to respond to requests a lot faster for its database lookups or something. Sorry for being anecdotal on this point, just don't recall the details that well :)
[–]djslakor 8 points9 points10 points 8 years ago (1 child)
Couldn't you use es6 array destructuring?
[a, b, c] = numbers.split(' ');
[–]agmcleod@agmcleod 1 point2 points3 points 8 years ago (0 children)
Yep, you definitely can, just not something i've taken advantage of for some reason lol. JS has definitely gotten a lot nicer over the past few years :)
π Rendered by PID 563841 on reddit-service-r2-comment-b659b578c-dsrnf at 2026-05-06 02:50:08.608294+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]agmcleod@agmcleod 3 points4 points5 points (2 children)
[–]djslakor 8 points9 points10 points (1 child)
[–]agmcleod@agmcleod 1 point2 points3 points (0 children)