Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
I have 10 digit telephone number. I need to find the last 4 digits of a given number using Angular Js.
Is there any way to find the given number.
EG: 9916983265
If your telephone number is a String
var telNb = "9916983265"; var last4Digits = telNb.substring(telNb.length-4, telNb.length);
If your telephone number is an integer :
var telNb = 9916983265; var last4Digits = telNb % 10000;
Add a comment
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.