function tel(tel) { const telNum = tel.toString(); const reg = /^(d{3})d{4}(d{4})$/; return telNum.replace(reg, '$1****$2') } tel(13212341234)