about | help | code help+videos | done | prefs |
This method returns the number of times "42" appears at the start or end of the input parameter str. If there are no "42" appearances at the start or end of the string, return 0. If the string starts OR ends in "42" return 1. If the string both starts AND ends in two different copies of "42" return 2. num42Maybe("42") → 1 num42Maybe("4242") → 2 num42Maybe("4") → 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
Difficulty: 190
Copyright Nick Parlante 2017 - privacy