about | help | code help+videos | done | prefs |
findWord
Write a function findWords(text,target) which searches the string text and finds the first place where target appears as a whole word (not contained in another word). Notice that you could have punctuation right after target (which you may assume is a period, exclamation mark, question mark, semi-colon, dash, comma, or quotation mark) findWord('Code for finding all examples is hard to find! Right?', 'find') → 41 findWord('Sandy punctuation and-or dashes are silly and fun', 'and') → 18 findWord('How about an easy one?', 'How') → 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