title: convert nested ternary to basic if else
body: <p>I'm trying to understand a javascript code that I've taken from an online source. But it is of full <code>?</code> and <code>:</code> symbols(ternary operators) and on top of that, this has multiple nested ternary operators.</p>
  
  <p>Below is the code.</p>
  
  <pre><code>function () {
                  var e = this,
                      t = e.$createElement,
                      n = e._self._c || t;
                  return n("v-card", [e.responseCard.title.trim() ? n("v-card-title", {
                      staticClass: "red lighten-5",
                      attrs: {
                          "primary-title": ""
                      }
                  }, [n("span", {
                      staticClass: "headline"
                  }, [e._v(e._s(e.responseCard.title))])]) : e._e(), e._v(" "), e.responseCard.subTitle ? n("v-card-text", [n("span", [e._v(e._s(e.responseCard.subTitle))])]) : e._e(), e._v(" "), e.responseCard.imageUrl ? n("v-card-media", {
                      attrs: {
                          src: e.responseCard.imageUrl,
                          contain: "",
                          height: "33vh"
                      }
                  }) : e._e(), e._v(" "), e._l(e.responseCard.buttons, (function (t, i) {
                      return n("v-card-actions", {
                          key: i,
                          staticClass: "button-row",
                          attrs: {
                              actions: ""
                          }
                      }, [t.text &amp;&amp; t.value ? n("v-btn", {
                          attrs: {
                              disabled: e.hasButtonBeenClicked,
                              default: ""
                          },
                          nativeOn: {
                              "~click": function (n) {
                                  e.onButtonClick(t.value)
                              }
                          }
                      }, [e._v("\n      " + e._s(t.text) + "\n    ")]) : e._e()], 1)
                  })), e._v(" "), e.responseCard.attachmentLinkUrl ? n("v-card-actions", [n("v-btn", {
                      staticClass: "red lighten-5",
                      attrs: {
                          flat: "",
                          tag: "a",
                          href: e.responseCard.attachmentLinkUrl,
                          target: "_blank"
                      }
                  }, [e._v("\n      Open Link\n    ")])], 1) : e._e()], 2)
              }
  </code></pre>
  
  <p>Can someone please convert this into a basic <code>if-else</code> block that is easily readable/understandable, I've read about this online, but due to the nested things, I'm very confused and unable to understand on how to do it.</p>
  
  <p>Hi All, please don't take me wrong in asking such a basic question, I'm asking only because of the nested ternary operators and I'm unableto understand on how to break this down :-(</p>
  
  <p>Thanks</p>