Skip to content

Commit 8a7805a

Browse files
authored
Add login function for user authentication
1 parent 7f9debe commit 8a7805a

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

script2.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
function login() {
2+
const user = document.getElementById("username").value;
3+
const pass = document.getElementById("password").value;
4+
5+
if (user === "ElonMusk" && pass === "Money$") {
6+
alert("Access Granted ✅");
7+
} else {
8+
alert("Locked Out ❌");
9+
}
10+
}

0 commit comments

Comments
 (0)