Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <script type="text/javascript">
- var database = [
- {
- username : "omar",
- password : "secret"
- }
- ];
- var newsFeed =[
- {
- username : "Amer",
- timeline :"i hate studying"
- },
- {
- username :"Khalid",
- timeline :"i'm hungry "
- }
- ];
- var userName= prompt("what is your username?");
- var passWord = prompt(" what is your password?");
- function signIn(user,pass){
- if (user===database[0].username && pass === database[0].password){
- console.log (newsFeed);
- }else
- alert ("sorry your username or password is not correct!");
- }
- signIn(userName , passWord);
- </script>
- </head>
- <body>
- </body>
- </html>
Add Comment
Please, Sign In to add comment