js secret phone number

The method of using the phone number string interception covert

  • Secret phone number
	var str='15771699304';  
	var str2 = str.substr(0,3)+"****"+str.substr(7);
	console.log(str2);   // 157****9304
Published 47 original articles · won praise 4 · Views 6691

Guess you like

Origin blog.csdn.net/lifangfang0607/article/details/100539483