Skip to content

Instantly share code, notes, and snippets.

@mehdi-farsi
Last active February 25, 2018 19:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mehdi-farsi/de16f697588eab918f03 to your computer and use it in GitHub Desktop.
Save mehdi-farsi/de16f697588eab918f03 to your computer and use it in GitHub Desktop.
Splat Operator and Arrays
cell_42 = ['inmate #42', 'inmate #43']
common_room = ['inmate #40', 'inmate #41', *cell_42, 'inmate #44']
# => ['inmate #40', 'inmate #41', 'inmate #42', 'inmate #43', 'inmate #44']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment