I am trying to create a dynamic list using the following code:
const permissions: string[] = []
Object.keys(userPerms).forEach((key) => {
permissions.push(`${capitalise(key)} ${userPerms[key] ? '🟢' : '🔴'}`)
})
The output I want:
Send Messages 🟢
Join Call 🔴
Send Emojis 🟢
The output I am getting with my current code:
Send Messages 🟢
Join Call 🔴
Send Emojis 🟢
keyand useString.prototype.padEnd()to make up the difference for shorter strings. If you're displaying this in HTML though, you can probably just use CSSkey?