You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Challenge Find the Longest Word in a String has an issue.
User Agent is: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.
Test for the third dot point (findLongestWord("May the force be with you") should return 5.) does not tick even though the output satisfies the requirement.
My code:
vararray=[];varz=0;functionfindLongestWord(str){array=str.split(' ');varnewArray=array.map(function(val){returnval.length;});for(i=0;i<=newArray.length;i++){if(newArray[i]>z){z=newArray[i];}}returnz;}findLongestWord("May the force be with you");
The text was updated successfully, but these errors were encountered:
Challenge Find the Longest Word in a String has an issue.
User Agent is:
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36
.Please describe how to reproduce this issue, and include links to screenshots if possible.
Test for the third dot point (findLongestWord("May the force be with you") should return 5.) does not tick even though the output satisfies the requirement.
My code:
The text was updated successfully, but these errors were encountered: