angularjs - find last 4 digits of a given number using Angular js -


I have a 10 digit telephone number, I need to use the last 4 digits of a given number of Angel JS.

Is there a way to find the given number?

Example: 9916983265

If your telephone number is a string

< Pre> var telNb = "9916983265"; Var last4Digits = telNb.substring (telNb.length-4, telNb.length); If your telephone number is an integer:
  var telNb = 9916983265; Var previous 4 digits = telnb% 10000;  

Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -