What will be the output of the below code segment?

var input = "1234-5678-9012-3456-7890";

alert(input.substring(0,7) + input.substring(7,15).replace(/\d/g, "*") + input.substring(15));

 Posted by Rajnilari2015 on 10/24/2015 | Category: JavaScript Interview questions | Views: 304 | Points: 40
Select from following answers:
  1. 1234-56**-****-*456-7890
  2. 1234-5***-****-3456-7890
  3. 1234-56**-****-3456-7890
  4. 1234-56**-***-3456-7890
  5. All Above

Show Correct Answer


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response