Created
March 4, 2021 22:33
-
-
Save stoneboyindc/b618bd8680f0a422764a4449b727e2e2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function printNames (names) { | |
names.forEach(name => console.log(name)); | |
} | |
function logTreeType (trees) { | |
trees.forEach(type => console.log(type.type)); | |
} | |
function totalPoints(points) { | |
// your solution here | |
let total = 0 | |
points.forEach(score => { | |
total += score; | |
}); | |
return total; | |
} | |
function buildSentence(words) { | |
let sentence = ""; | |
words.forEach((word) => { | |
sentence += `${word} `; | |
}); | |
return sentence; | |
} | |
function logPercentages(decimals) { | |
decimals.forEach((decimal) => { | |
console.log(`${decimal * 100}%`); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment