| about | help | code help+videos | done | prefs |
You are given a password represented by the String password. In order to keep the password hidden from potential onlookers, the computer will censor it with asterisks when it's typed. However it will make the first and last character visible so it is easier for you to check. You must find a way to return the censored password. The password must be at least 6 characters, if not, return "INVALID". protectPassword("Password") → "P******d" protectPassword("1234") → "INVALID" protectPassword("ABC123") → "A****3" ...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
Copyright Nick Parlante 2017 - privacy