📄 scramble_example.htm
字号:
<html>
<head>
<title>yCode Scramble Example</title>
</head>
<body>
<p><a href="http:\\www.yCode.com" target="_top">yCode Home</a></p>
<font face="Helvetica">
<p align="center">
<b>yCode</b> Scramble Example
</p>
<table border="1" width="100%">
<tr>
<td valign="top" width="50%">
<code>
//this function will calculate a factorial <br>
function myFactorial(n) <br>
{ <br>
/* we assume an integer input greater than
or equal to zero */ <br>
if (n<=1) return 1;
<br>
var factorial_value=1;<br>
var loop_index;<br>
for (loop_index = 2; loop_index<=n; loop_index++)<br>
{<br>
factorial_value*=loop_index;<br>
}<br>
<br>
return factorial_value;<br>
}
<br>
</code>
</td>
<td valign="top" width="50%">
<li><i>function</i> keyword is on a separate line; argument(s) are on the same
line as the function name.</li>
<li>program statements are on separate lines and should be terminated with ";"</li>
<li>loop variable declared on a separate line using <i>var</i> keyword</li>
<li>we didn't use <i>x</i> or <i>y</i> variables since they define some properties for
dhtml objects and hence will not be scrambled.
</td>
</tr>
<tr><td colspan=2>
The same function after being scrambled:<br><br>
<code>
function x940202882765(x940202882766) { if (x940202882766<=1) return 1; var x940202882767=1; var x940202882768; for (x940202882768 = 2; x940202882768<=x940202882766; x940202882768++) { x940202882767*=x940202882768; } return x940202882767; }
</code>
</td>
</tr>
</table>
</font>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -