函数是一种值

可以赋给变量

by shengoo

JavaScript

var square = function(x){
  return x*x;  
};
console.log(square(3));