<!DOCTYPE html>
<html>
<body>
<p>把函数存储在变量中后,该变量可用作函数:</p>
<p id="demo"></p>
<script>
var x = function (a, b) {return a * b};
document.getElementById("demo").innerHTML = x(4, 3);
</script>
</body>
</html>