Is this user-facing text? If so consider i18n (in JS, `gettext`).

Also, this could be indented to align under the `if`.