forked from iDTech-Neha/iDTech_JavaScript_Coding
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample4.js
More file actions
18 lines (16 loc) · 697 Bytes
/
Copy pathexample4.js
File metadata and controls
18 lines (16 loc) · 697 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/**
* Description: This program is asking the user to create a new password for their account but there is a bug
* in the code preventing the code to run as expected. Your task is to run and debug the program by reading the error message.
*
* TODO: The program has an error message in the console. You should read the message and debug accordingly.
*/
function checkPoint4() {
// TODO: Remove the bugs from the code below.
//Initialized password to 0, so that password.length
//will work properly.
let password = 0;
while (password.length != 10) {
password = prompt("New password must be 10 characters:");
}
alert("Your new password: " + password);
}