Last active
May 3, 2021 01:06
-
-
Save stoneboyindc/07987ae72b49443a3250e1a1dcc348d0 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
const printNames = names=> { | |
names.forEach((names)=> | |
console.log(names)); | |
} | |
const logTreeType=trees=>{ | |
trees.forEach((tree)=> | |
console.log(tree.type)); | |
} | |
const totalPoints = points=>{ | |
let sum = 0 | |
points.forEach((num)=> sum += num) | |
return sum | |
} | |
const buildSentence = words =>{ | |
let sentence = "" | |
const func= (word)=> sentence += word + " " | |
words.forEach(func) | |
return sentence | |
} | |
const logPercentages =decimals=> { | |
return decimals.map((decimal) => { | |
return decimal * 100 + "%" | |
}) | |
} | |
module.exports = { | |
printNames, | |
logTreeType, | |
totalPoints, | |
buildSentence, | |
logPercentages | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment