about | help | code help+videos | done | prefs |
Write a method that determines if a given letter is between two letters in the same case. For example, letterBetween('b','e','c') returns true because 'c' is between 'b' and 'e'. Also, letterBetween('b','e','b') returns true because the first and last letters are included. If the testLetter is NOT between the other two letters, return false. You may make the following assumptions: first and last will be the same case. Alphebetically, first will come before last, or first and last will be the same letter. All three input parameters will be a letter of the alphabet. You may NOT assume that testLetter is the same case as the other two letters, but if it is NOT the same case then it will NOT be considered to be between the other two letters. letterBetween("D", "F", "E") → true letterBetween("D", "F", "e") → false letterBetween("c", "c", "c") → true ...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: 290
Copyright Nick Parlante 2017 - privacy