let options={ shareUserId:123, } // let shareUserId=options.shareUserid||options.shareUserId||options.shareUserID; for (let item in options){ if(item.toLowerCase()=='shareuserid'){ let shareUserId=options[item]; console.log(shareUserId);//123 } }
let options={ shareUserId:123, } // let shareUserId=options.shareUserid||options.shareUserId||options.shareUserID; for (let item in options){ if(item.toLowerCase()=='shareuserid'){ let shareUserId=options[item]; console.log(shareUserId);//123 } }
转载于:https://www.cnblogs.com/yuesu/p/10219760.html