Does anyone know how we can fix the situation mentioned in that paragraph: if it print out all the letters just according to the first letter of name. How to add more conditions so it matches the letters from the name?
pushing each character found in your Second-FOR-loop,
you will have to collect these characters into a temporary variable using the
AFTER leaving the Second-FOR-loop
( all characters have been collected in a temporary variable )
In an IF condition you compare myName with tempVar ( myName === tempVar )
true, you can than
push myName into the
Thank you! It's very clear and helpful.
so if have an array:
var arr = ["J", "a", "n", "e"];
you can join the elements to create a string "Jane" by typing:
As an aside, the "" argument means there will be no spaces in between the joined elements; that is, an argument of "," would create a string:
Hope this helps.
Victory! (Name Search+) Array Organization Question
Question 7 Attempts With Separate Array But Returns Error
Can you explain this in more detail? I'm not sure what you mean by "( all characters have been collected in a temporary variable )". How do I collect all characters into the tempVar variable?