Skip to content

Commit 2b4b013

Browse files
committed
Pending changes exported from your codespace
1 parent bb4e94a commit 2b4b013

23 files changed

Lines changed: 113 additions & 22 deletions

File tree

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
function isOldEnoughToDrink(age) {
2-
// your code here
2+
if(age >= 21)
3+
return true;
4+
else
5+
return false;
36

47
}
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
function isOldEnoughToDrive(age) {
2-
// your code here
2+
if (age >= 16)
3+
return true
4+
else
5+
return false
6+
37

48
}
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
function isOldEnoughToVote(age) {
2-
// your code here
2+
if (age>=18)
3+
return true
4+
else
5+
return false
36

47
}
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
function isOldEnoughToDrinkAndDrive(age) {
22
// your code here
3-
3+
if (age>22)
4+
return false
5+
else (age<16)
6+
return false
47
}

exercises/005-checkAge/app.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
function checkAge(name, age) {
22
// your code here
3-
4-
}
3+
if(age < 21)
4+
return `Go home, ${name}!`
5+
else
6+
return `Welcome, ${name}!`
7+
}

exercises/006-getFullName/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
function getFullName(firstName, lastName) {
22
// your code here
3-
3+
return firstName + " " + lastName
44
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
function getLengthOfWord(word) {
22
// your code here
3-
3+
return word.length
44
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
function getLengthOfTwoWords(word1, word2) {
22
// your code here
3-
3+
return word1.lenght + word2.lenght
44
}

exercises/009-getLengthOfThreeWords/app.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
function getLengthOfThreeWords(word1, word2, word3) {
22
// your code here
3-
3+
let length1 = word1.length;
4+
let length2 = word2.length;
5+
let length3 = word3.length;
6+
let sumOfLengths = length1 + length2 + length3;
7+
return sumOfLengths;
48
}
59

610
let output = getLengthOfThreeWords('some', 'other', 'words');

exercises/010-isSameLength/app.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
1-
// Write your function here
1+
// Write your function here
2+
function isSameLenght(word1,word2){
3+
let lenght1= word1.lenght1
4+
let lenght2= word2.lenght1
5+
6+
if(lenght1 === lenght2)
7+
return true
8+
else
9+
return false
10+
}

0 commit comments

Comments
 (0)