การคัดลอกรหัสมีดังนี้:
<script type = "text/javascript">
ฟังก์ชั่น fn (ชื่อ) {
if (typeof name === "String") {
var args = array.prototype.slice.call (อาร์กิวเมนต์, 1);
สำหรับ (var i = 0; i <args.length; i ++) {
การแจ้งเตือน (args [i]); // ผลลัพธ์: 111 222
-
-
-
ฟังก์ชั่น callfn () {
FN ("ทดสอบ", 111,222);
-
callfn ();
</script>