about | help | code help+videos | done | prefs |
hasSymmetry
Return true if the given array has symmetry. Here, symmetry means the first element is equal to the last element, the second element is equal to the second-to-last element, and so on, all the way to the middle of the array. Arrays with fewer than two elements have symmetry. hasSymmetry([1, 4, 6, 4, 1]) → true hasSymmetry([23, 8, 8, 23]) → true hasSymmetry([1, 1, 1, 2, 1]) → false ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 205
Copyright Nick Parlante 2017 - privacy