2009-01-07 関数 js X=4だったら1を返してそれ以外の数値だったらx*(x-1)の結果を返すスクリプト。 使い道?なにそれどんな道?function j(x){ if(x == 4){ return 1; }else{ return x* (x-1); } }j(7);