it shows:there is a problem with your code
here's my code:
var text='Madhu','Ma','Mad';
var myName='Madhu';
var hits=[];
for(var i=0;i if(text[i]==='M') {



Your FOR-loop defintion is questionable.....

for(var i=0;i if(text[i]==='M')


= AND=

Please re-edit your Post

  • leave one blank-line above of your code
  • select your code in the Post
  • then =click= on the </>-symbol-of-this-editor

Your code will then be in a pre-code state
and you will be able to make/present the proper indentations.

or even better use
= http://discuss.codecademy.com/t/using-backticks-to-format-your-code/3697


actually the thing is..,i copy-pasted the whole program..,but somehow in the preview option..,it's not accepting the changes i made.....
here's my code again :



Your text variable definition is the problem....

 var text="'Madhu','Ma','Mad'";


var text="Madhu Ma Mad";


thanku so much for your help ... :smile: