Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function password(input) {
- let index = 0;
- let userName = input[index];
- index++;
- let password = input[index];
- index++;
- let differentPassword = input[index];
- index++;
- while (differentPassword !== password) {
- differentPassword = input[index];
- index++;
- }
- console.log(`Welcome ${userName}!`);
- }
- password(["Nakov", "1234", "Pass", "1324", "1234"])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement