函数是用对象来实现的。 函数也和C++中的函数类似。
C++
function add(a, b) { return a + b; } let add = function (a, b) { return a + b; } let add = (a, b) => { return a + b; }
如果未定义返回值,则返回undefined。
undefined
京公网安备 11010502049817号