Skip to content

Commit

Permalink
task 1 completed
Browse files Browse the repository at this point in the history
  • Loading branch information
Areebey committed Dec 1, 2023
1 parent 19e01e4 commit 49b1e56
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
40 changes: 40 additions & 0 deletions JS Task1/App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// Password Confirmation Program

let username=prompt("Enter your username");
let phone=prompt("Enter your phone no");
let email=prompt("Enter your email");
let password=prompt("Enter your password");
let confirm_password=prompt("Re-enter your Password");

if(username==0){
alert("Please Enter the Username");
username=prompt("Enter your username");
}
if(phone==0){
alert("Please Filled the Phone no");
phone=prompt("Enter your phone no");
}
if(email==0){
alert("Please Filled the Email");
username=prompt("Enter your email");
}
if(password==0){
alert("Please Filled the Password");
username=prompt("Enter your password");
}
if(confirm_password==0){
alert("Please Filled the Correct Password");
username=prompt("Re-enter your Password");
}

if(password===confirm_password){
alert("Registered Successfully");
}
else{
alert("Password doesn't match, Try Again!")
}

console.log(username);
console.log(phone);
console.log(email);
console.log(password);
14 changes: 14 additions & 0 deletions JS Task1/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Registration System</title>
</head>
<body>
<!-- Password Confirmation Validator -->
<h2>Hello World</h2>

<script src="App.js"></script>
</body>
</html>

0 comments on commit 49b1e56

Please sign in to comment.