snipt

Ctrl+h for KB shortcuts

JavaScript

JS if shorthand

this.slide_direction = (this.options.content_type != 'comments_slider') ? 'left' : 'up';
https://snipt.net/embed/3c8f2379df8b39716fd27790653a7e2d/
/raw/3c8f2379df8b39716fd27790653a7e2d/
3c8f2379df8b39716fd27790653a7e2d
js
JavaScript
1
2019-07-11T16:22:59
True
False
False
/api/public/snipt/23218/
js-if-shorthand
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="k">this</span><span class="p">.</span><span class="nx">slide_direction</span> <span class="o">=</span> <span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">options</span><span class="p">.</span><span class="nx">content_type</span> <span class="o">!=</span> <span class="s1">&#39;comments_slider&#39;</span><span class="p">)</span> <span class="o">?</span> <span class="s1">&#39;left&#39;</span> <span class="o">:</span> <span class="s1">&#39;up&#39;</span><span class="p">;</span> </span></pre></div> </td></tr></table>
js, shorthand