376 / 59
A password manager wants to create a new password using two strings given by the user, then combined to create a harder-to-guess combination. Given two strings, interleave the characters of the strings to create a new string. Beginning with an empty string, alternately append a character from string a and from string b. If one of the strings is exhausted before the other, append the remaining letters from the other string all at once. The result is the new password.
If a = saplab and b = q4interview ,the result is sqa4pilnatberview.
Complete the function newPassword in the editor below
newPassword has the following parameter(s):
string a the first string
string b the second string
Show Full Paragraph