RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

Code Golf: Conditionally Add To An Array

Ruby’s expressiveness and vast API provides a myriad of ways to solve the same problem. This post proposes different ways to add elements to an array only if a certain condition applies.

https://dev.to/thegnarco/code-golf-conditionally-add-to-an-array-5291

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in