1. 关于手机号加密
const phone = '13595968984';
phone.substr(-4).padStart(phone.length, '*');
保留手机尾号四位
2. 数组扁平化
const arr1 = [1, ['a', 3, ['c', 5]], 'b'];
arr1.flat(Infinity)
const phone = '13595968984';
phone.substr(-4).padStart(phone.length, '*');
保留手机尾号四位
const arr1 = [1, ['a', 3, ['c', 5]], 'b'];
arr1.flat(Infinity)