js函数的默认参数

function f(flag, start, end, msg){

  flag = flag == false ? flag true;

  start = start || null;

  start = arguments[1] ? arguments[1] : null;

  end = end || null;

  end = arguments[2] ? arguments[2] : null;

  msg = msg || null;

  msg = arguments[3] ? arguments[3] : null;

}

当你的才华还撑不起你的野心时
那你就应该静下心来学习
当你的能力还驾驭不了你的目标时
那就应该沉下心来历练
原文地址:https://www.cnblogs.com/yang-xiansen/p/10174122.html