mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
11 lines
1.1 KiB
HTML
11 lines
1.1 KiB
HTML
|
<span class="com">// foo is a cool function</span>
|
||
|
<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>
|
||
|
|
||
|
<span class="com">/* bar is a cool var */</span>
|
||
|
<span class="kwd">var</span> <span class="pln">bar</span> <span class="pun">=</span> <span class="dec">3</span><span class="pun">;</span>
|
||
|
|
||
|
<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>
|
||
|
<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>
|
||
|
<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>
|
||
|
<span class="pun">}</span>
|