-
Notifications
You must be signed in to change notification settings - Fork 0
/
js.html
28 lines (26 loc) · 864 Bytes
/
js.html
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
<html>
<head>
<script>
/*let hour = prompt('What is the current hour?');
if (hour < 12){
alert('Good morning');
}else{
alert('Hello');
}*/
//let country = prompt('What country are you from?');
//country = country.toLowerCase();
let country = prompt('What country are you from?').toLowerCase();
console.log(country);
//if (country.toLowerCase() === 'portugal' || country.toLowerCase() === 'brazil')
if (country === 'portugal' || country === 'brazil'){
alert('You speak portuguese');
}else{
if (country === 'france' || country === 'belgium'){
alert('You speak french');
}else{
alert('You speak another language');
}
}
</script>
</head>
</html>