about | help | code help+videos | done | prefs |
getFirstAndLast
getFirstAndLast(myList) - Give myList, a list with at least one element, return another list with only the first and last elements of myList. For example, given [1,2,3,4,5] to your function, the return value would be [1,5]. getFirstAndLast([1, 2, 3, 4, 5]) → [1, 5] getFirstAndLast([1]) → [1, 1] getFirstAndLast([0, 0, 0, 0, 0, 0]) → [0, 0] ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy