presentations/highlight-js/test/markup/javascript/class.expect.txt

12 lines
656 B
Text
Raw Permalink Normal View History

2018-12-07 08:48:05 -06:00
<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Car</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">Vehicle</span> </span>{
<span class="hljs-keyword">constructor</span>(speed, cost) {
<span class="hljs-keyword">super</span>(speed);
<span class="hljs-keyword">var</span> c = <span class="hljs-built_in">Symbol</span>(<span class="hljs-string">'cost'</span>);
<span class="hljs-keyword">this</span>[c] = cost;
<span class="hljs-keyword">this</span>.intro = <span class="hljs-string">`This is a car runs at
<span class="hljs-subst">${speed}</span>.`</span>;
}
}