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

c# - SignalR: "Protocol error: Unknown transport." when navigating to hub -

c# - WPF Expander overlay used in ItemsControl -

class - Kivy: how to instantiate a dynamic classes in python -