mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
13 lines
1.2 KiB
HTML
13 lines
1.2 KiB
HTML
|
<ol>
|
||
|
<li><span class="com">// foo is a cool function</span></li>
|
||
|
<li><span class="kwd">function</span> <span class="pln">foo</span><span class="pun">(</span><span class="pun">)</span> <span class="pun">{</span><span class="pun">}</span></li>
|
||
|
<li></li>
|
||
|
<li><span class="com">/* bar is a cool var */</span></li>
|
||
|
<li><span class="kwd">var</span> <span class="pln">bar</span> <span class="pun">=</span> <span class="dec">3</span><span class="pun">;</span></li>
|
||
|
<li></li>
|
||
|
<li><span class="typ">A</span><span class="pun">.</span><span class="pln">prototype</span><span class="pun">.</span><span class="pln">foo</span> <span class="pun">=</span> <span class="kwd">function</span><span class="pun">(</span><span class="pun">)</span> <span class="pun">{</span></li>
|
||
|
<li> <span class="kwd">this</span><span class="pun">.</span><span class="pln">noise</span> <span class="pun">|</span><span class="pun">|</span> <span class="str">'<chirp>'</span><span class="pun">;</span></li>
|
||
|
<li> <span class="kwd">return</span> <span class="str">'Hello from '</span> <span class="pun">+</span> <span class="kwd">this</span><span class="pun">.</span><span class="pln">name</span><span class="pun">;</span></li>
|
||
|
<li><span class="pun">}</span></li>
|
||
|
<li></li>
|
||
|
</ol>
|