-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
29 lines (21 loc) · 744 Bytes
/
index.js
File metadata and controls
29 lines (21 loc) · 744 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//28.03.2020 Esin Ece Aydin
var kullanicilar = [
{email:"aa@gmail.com", sifre:"1234"},
{email:"ee@gmail.com", sifre:"5678"}
]
var tweetler = [
{email:"aa@gmail.com", tweet:"Bugün hava çok güzel."},
{email:"aa@gmail.com", tweet:"Bugün hava çok güzel 222."},
{email:"ee@gmail.com", tweet:"Kapıyı ben açacağım."}
]
var email = prompt("email: ")
var sifre = prompt("şifre: ")
function giris(){
if((email == kullanicilar[0].email && sifre == kullanicilar[0].sifre) || (email == kullanicilar[1].email && sifre == kullanicilar[1].sifre)){
console.log(tweetler)
}
else{
console.log("Kullanıcı adı veya şifre hatalı!")
}
}
giris(email, sifre)