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