Add room description.

This commit is contained in:
2021-05-17 22:00:30 -07:00
parent 03eddfcd74
commit b3058097b4
4 changed files with 18 additions and 10 deletions

View File

@ -15,7 +15,8 @@ export default class Container {
.map(({ name }, i) => {
let anItem = `${vowels.includes(name[0]) ? "an" : "a"} ${name}`;
if (i + 1 === items.length) {
// if we have more than one item, and this is the last item...
if (i > 1 && i + 1 === items.length) {
anItem = `and ${anItem}`;
}