Skip to content

Instantly share code, notes, and snippets.

@jimmythai
Last active July 9, 2019 11:51
Show Gist options
  • Save jimmythai/15d17c7826cb07b62ea4bec9e061f951 to your computer and use it in GitHub Desktop.
Save jimmythai/15d17c7826cb07b62ea4bec9e061f951 to your computer and use it in GitHub Desktop.
let scale = 10
let numberStrings = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
print(numberStrings.prefix(scale)) // ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
print(numberStrings.suffix(scale - scale)) // []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment