4/7.....,help


#1

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') {
}
}


#2

@madhusweet,

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

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

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for

= 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
[extra's]
https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet


#3

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 :


#4

@madhusweet,

Your text variable definition is the problem....
Either

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

or

var text="Madhu Ma Mad";

#5

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