about | help | code help+videos | done | prefs |
findWord
Determine if a string word is inside of a string original. DO NOT use the built-in string method find! Both target and word are strings of any length. Return the index of the leftmost occurrence of the word, or -1 when it isn't found. findWord('salad', 'x') → -1 findWord('fish', 'fi') → 0 findWord('fish', 'sh') → 2 ...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