| about | help | code help+videos | done | prefs |
Given a String, integer, and boolean value: if b is true, return the even indexed characters up to the nth indexed character including 0. If b is false, return the odd indexed characters up to the nth indexed character not including 0. But if the length of s is shorter than n, return "melon". stringnumboo("dog", 6, true) → "melon" stringnumboo("killerkeemstar", 8, false) → "ilre" stringnumboo("melon", 3, true) → "ml" ...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: 100 Post-solution available
Copyright Nick Parlante 2017 - privacy