scrimba
Frontend Career Path
Getting hired
JavaScript Interview Challenges
Solution - Save Grandpa's Password
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Solution - Save Grandpa's Password
AboutCommentsNotes
Solution - Save Grandpa's Password
Expand for more info
index.js
run
preview
console
/*  
Grandpa's hand isn't as steady as it used to be. You finally convinced him
to start using a password manager, but he accidentally typed and saved his
password with a bunch of extra characters. Help him recover his password by
removing all the duplicate characters.

Your function should take in a string of characters and return a
string with the duplicate characters removed. Assume that your input
is lowercased with only letters and numbers.

Example input: "aabbccb1212"
Example output: "abc12"
*/
const password = "9338dsabbbadjdjdj2sdfdfdf282ff8fdsd888ss8cfgfg332q23";

function removeDupeChars(chars){

}

console.log(removeDupeChars(password));
Console
undefined
,
/index.html
-3:23