Home > front end >  A large new solutions
A large new solutions

Time:10-28

Use a for loop to get in Js repeat the number of characters in a string,
Such as 145555 ABC 5 repeated several times inside

CodePudding user response:

The most primitive method
 
Var num=0;
For (var I=0; i If (STR [I]=="5")
num++;
}
Alert (num);
  • Related