本文共 286 字,大约阅读时间需要 1 分钟。
let a = { n: 1 };let b = a;a.m = a = {m: 2};console.log(a);console.log(b);
function minCostToMoveChips(position){ let odd = position.filter(item => item%2 == 1).length; let even = position.filter(item => item%2 == 0).length; return odd > even ? even : odd;}let position = [2,2,2,3,3]
转载地址:http://fetzi.baihongyu.com/