Is there any way to shorten these lines?

I have an emoji input app, which has array like features. I want it so if you type the emoji’s name instead of actually pasting it it appears.

I’ve tried searching online for ways to make this code better but they are all specific.

addToBeginning.addEventListener("click", () => {

      let o = inputEl.value

      if (o.toLowerCase() === "honeypot") {
        emojis.unshift("🍯")
        const q = emojis.join(" ")
        emojiOutput.textContent = q
        inputEl.value = "";
        inputEl.focus()
      } else if (o.toLowerCase() == "chocolate") {
        emojis.unshift("🍫")
        const q = emojis.join(" ")
        emojiOutput.textContent = q
        inputEl.value = "";
        inputEl.focus()
      } // etc , have like 10 more lines that follow this same format, all hardcoded

Answer

Just look them up:

const emojis = []
const allEmojis = {
  "honeypot": "🍯",
  "chocolate": "🍫"
}

addToBeginning.addEventListener("click", () => {
  let o = inputEl.value.toLowerCase();
  const emoji = allEmojis[o];
  if (!emoji) return; // or give error and return
  emojis.unshift(emoji)
  const q = emojis.join(" ")
  emojiOutput.textContent = q;
  inputEl.value = "";
  inputEl.focus()
})