-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgrupp6.js
More file actions
50 lines (28 loc) · 964 Bytes
/
Copy pathgrupp6.js
File metadata and controls
50 lines (28 loc) · 964 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
console.log("Hello"); //Lucas kommentar
function square(number) { // Vadzim function square
return number * number;
}
console.log(square(5,5))
const addMood = (name = "Karl") => { // Karl function: returns provided name with a random mood. if name is not provided default to "Karl"
const emojiPicker = Math.floor(Math.random() * 4); // returns an int between 0 and 3
const emojis = ["😠","😎","🙃","😐"];
return name + " " + emojis[emojiPicker]; // emojiPicker is used to get a value from the specified index in emojis
}
console.log(addMood("Karl"));
function logKen(){ // Kenneth function with while loop with the name logKen
let x = 1;
while(x < 5){
console.log("hej");
x++;
}
}
logKen();
let mette = "forvirrad"; // en liten variabel
console.log(mette);
function Lucas() //Lucas funktion
{
let message = 'Hello group 6';
console.log(message);
}
Lucas();
console.log("test");