Skip to content

Commit 519250a

Browse files
Update JS Promise Login System.html
1 parent 361b0b5 commit 519250a

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

JS Promise Login System/JS Promise Login System.html

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ <h2 class="title text-center">LOGIN SYSTEM</h2>
2626

2727
<script>
2828

29-
$(document).ready(function(){
29+
$(document).ready(function(){
3030

3131
$("#but").click(function(){
3232

@@ -37,7 +37,15 @@ <h2 class="title text-center">LOGIN SYSTEM</h2>
3737
if(username == "truecodes" && password == "codeblogger"){
3838
resolve("Welcome " + username );
3939
}else{
40-
reject("Check your username and password again.")
40+
if(username == "truecodes" && password != "codeblogger"){
41+
reject("You entered the password incorrectly.")
42+
}
43+
else if(username != "truecodes" && password == "codeblogger"){
44+
reject("You entered the username incorrectly.")
45+
}else{
46+
reject("Please check your username and password again.")
47+
}
48+
4149
}
4250
})
4351

0 commit comments

Comments
 (0)