-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbasicjs.js
More file actions
36 lines (29 loc) · 774 Bytes
/
basicjs.js
File metadata and controls
36 lines (29 loc) · 774 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
30
31
32
33
34
35
// var temperature =55;
// if (temperature <= 10){
// console.log ("fresh in here");
// }
// else {
// console.log ("not so fresh");
// }
// // temperature = 5;
// var highVal = [1,7,-3,9];
// document.write (Math.max.apply(undefined, highVal));
// document.write (Math.max.apply(null, highVal));
// document.write (Math.max.apply(Math, highVal));
// var multis = [1,3,7,10,2];
// function multiplication (a) {
// multi = a[0];
// for (i=1; i<parseInt(a.length); i++) {
// multi = multi * a[i];
// }
// }
// multiplication(multis);
// console.log(multi);
var usertemp = prompt("enter the hotness");
console.log (usertemp);
if (parseInt(usertemp)<25){
document.body.style.backgroundColor = "blue";
}
else {
document.body.style.backgroundColor = "salmon";
}