diff --git a/exercises/001-isOldEnoughToDrink/app.js b/exercises/001-isOldEnoughToDrink/app.js index c4d3bab4d..9436245df 100644 --- a/exercises/001-isOldEnoughToDrink/app.js +++ b/exercises/001-isOldEnoughToDrink/app.js @@ -1,4 +1,4 @@ function isOldEnoughToDrink(age) { // your code here - +return age >= 21 } diff --git a/exercises/002-isOldEnoughToDrive/app.js b/exercises/002-isOldEnoughToDrive/app.js index 0ab7348dd..7f0d27a0d 100644 --- a/exercises/002-isOldEnoughToDrive/app.js +++ b/exercises/002-isOldEnoughToDrive/app.js @@ -1,4 +1,4 @@ function isOldEnoughToDrive(age) { // your code here - + return age >= 16 } diff --git a/exercises/003-isOldEnoughToVote/app.js b/exercises/003-isOldEnoughToVote/app.js index 63c4efb41..1fdfbdfdb 100644 --- a/exercises/003-isOldEnoughToVote/app.js +++ b/exercises/003-isOldEnoughToVote/app.js @@ -1,4 +1,4 @@ function isOldEnoughToVote(age) { // your code here - + return age >= 18 } diff --git a/exercises/004-isOldEnoughToDrinkAndDrive/app.js b/exercises/004-isOldEnoughToDrinkAndDrive/app.js index c8c52473a..16b14fbc2 100644 --- a/exercises/004-isOldEnoughToDrinkAndDrive/app.js +++ b/exercises/004-isOldEnoughToDrinkAndDrive/app.js @@ -1,4 +1,4 @@ function isOldEnoughToDrinkAndDrive(age) { // your code here - +return false } diff --git a/exercises/005-checkAge/app.js b/exercises/005-checkAge/app.js index 0ff57081e..1e437f8d2 100644 --- a/exercises/005-checkAge/app.js +++ b/exercises/005-checkAge/app.js @@ -1,4 +1,6 @@ function checkAge(name, age) { // your code here + if (age < 21) return `Go home, ${name}!` + else return `Welcome, ${name}!` } diff --git a/exercises/006-getFullName/app.js b/exercises/006-getFullName/app.js index e8d8b83a8..c14d27a49 100644 --- a/exercises/006-getFullName/app.js +++ b/exercises/006-getFullName/app.js @@ -1,4 +1,4 @@ function getFullName(firstName, lastName) { // your code here - + return firstName + " " + lastName } diff --git a/exercises/007-getLengthOfWord/app.js b/exercises/007-getLengthOfWord/app.js index 8d04d4f58..faf440642 100644 --- a/exercises/007-getLengthOfWord/app.js +++ b/exercises/007-getLengthOfWord/app.js @@ -1,4 +1,4 @@ function getLengthOfWord(word) { // your code here - + return word.length; } diff --git a/exercises/008-getLengthOfTwoWords/app.js b/exercises/008-getLengthOfTwoWords/app.js index 032c8cff4..411783c96 100644 --- a/exercises/008-getLengthOfTwoWords/app.js +++ b/exercises/008-getLengthOfTwoWords/app.js @@ -1,4 +1,4 @@ function getLengthOfTwoWords(word1, word2) { // your code here - + return word1.length + word2.length } diff --git a/exercises/009-getLengthOfThreeWords/app.js b/exercises/009-getLengthOfThreeWords/app.js index 9049a6d5d..f1efe2f4f 100644 --- a/exercises/009-getLengthOfThreeWords/app.js +++ b/exercises/009-getLengthOfThreeWords/app.js @@ -1,6 +1,6 @@ function getLengthOfThreeWords(word1, word2, word3) { // your code here - + return word1.length + word2.length + word3.length } let output = getLengthOfThreeWords('some', 'other', 'words'); diff --git a/exercises/010-isSameLength/app.js b/exercises/010-isSameLength/app.js index 6ebc804ae..085816268 100644 --- a/exercises/010-isSameLength/app.js +++ b/exercises/010-isSameLength/app.js @@ -1 +1,4 @@ -// Write your function here \ No newline at end of file +// Write your function here +function isSameLength (word1, word2) { + return word1.length == word2.length; +} diff --git a/exercises/011-isGreaterThanTen/app.js b/exercises/011-isGreaterThanTen/app.js index b60c49b11..2d274bf74 100644 --- a/exercises/011-isGreaterThanTen/app.js +++ b/exercises/011-isGreaterThanTen/app.js @@ -1,4 +1,4 @@ function isGreaterThanTen(num) { // your code here - + return num > 10 } diff --git a/exercises/012-isLessThanThirty/app.js b/exercises/012-isLessThanThirty/app.js index a9612b873..f1a73962c 100644 --- a/exercises/012-isLessThanThirty/app.js +++ b/exercises/012-isLessThanThirty/app.js @@ -1,4 +1,4 @@ function isLessThan30(num) { // your code here - + return num < 30 } diff --git a/exercises/013-equalsTen/app.js b/exercises/013-equalsTen/app.js index 0d5c28e62..25c7bf3e5 100644 --- a/exercises/013-equalsTen/app.js +++ b/exercises/013-equalsTen/app.js @@ -1,4 +1,4 @@ function equalsTen(num) { // your code here - + return num == 10 } diff --git a/exercises/014-isLessThan/app.js b/exercises/014-isLessThan/app.js index d7572d4ad..6fac9d5c0 100644 --- a/exercises/014-isLessThan/app.js +++ b/exercises/014-isLessThan/app.js @@ -1,3 +1,4 @@ function isLessThan(num1, num2) { // your code here + return num2 < num1 }