SOURCE

// var maxProfit = function(prices, fee) {
//     let buy = prices[0]+fee, profit = 0
//     for (let i = 1; i < prices.length; i++){
//         if (buy > prices[i] + fee){
//             buy = prices[i] + fee
//         } else if (buy < prices[i]){
//             profit += prices[i] - buy
//             buy = prices[i]
//         }
//     }
//     return profit
// };
function main() {
  var a = 1;
  var b = 2;
 
  function add(x, y) {
    var z = x + y;
    return z;
  }
 
  console.log(add(a, b));
}
console 命令行工具 X clear

                    
>
console