SOURCE

var num = 10
// function sum (base, num) {
//   return base + num
// }

var sum = (function (num) {
  return function (base) {
    return base + num
  } 
})(num)

num = 15
console.log(sum(5, num) === 15)
console.log(sum(25, num) === 35)

// 不
console 命令行工具 X clear

                    
>
console