Skip to content

Instantly share code, notes, and snippets.

@atomjar
Created November 14, 2016 20:31
Show Gist options
  • Save atomjar/d34b9b8b23d411fd6f48e1fc4f183a89 to your computer and use it in GitHub Desktop.
Save atomjar/d34b9b8b23d411fd6f48e1fc4f183a89 to your computer and use it in GitHub Desktop.
function sentenceMaker (stringArray) {
let output = ''
for (var i = 0; i < stringArray.length - 1; i++) {
output = output + stringArray[i] + ' and '
}
output = output + stringArray[stringArray.length - 1]
return output
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment