Function

オブジェクト Object Type
Format
function 関数名(引数) function function name (arguments)
{ (
処理内容 Content Processing
} )
Commentary
関数を定義します。 Define the function. 引数は省略することができます。 The argument can be omitted. また、引数は,(カンマ)で区切って列記することができます。 The argument is, (comma) can be separated list. 関数の処理結果を呼び出し元に返したい場合にはreturn命令を使います。返SHITAI to the caller if the result of the function is used to return instruction.
サンプルコード Sample code
outputs[0] = getSec(); outputs [0] = getSec ();
function getSec(){ function getSec () (
var dObj = new Date(); var dObj = new Date ();
var n = dObj.getSeconds(); var n = dObj.getSeconds ();
return n.toString(); return n.toString ();
} )