私は学校の課題について助けが必要で、私はちょっと固まっています。この質問は次のことを定義し、私は精神的な "ジャンプスタート"が必要です。私は何を始めるべきか覚えているようには思えません。Javascript精神的なジャンプスタート
function get_longest_word(){
//Task 1, complete this function to find the longest word
//from the text entered into the textarea.
//Once the longest word is found display the longest word in an alert.
//Hint use the split(" ") method to split the string into an array of words.
var str = document.getElementById('input_text').value;//str is the string from the input text area
var longest_word = "not yet implementd";
alert(longest_word);
Google検索では、この演習に必要な解決策が得られました。これは宿題コード作成サービスではありません – charlietfl
あなたの割り当てに記載されているように 'str.split(" ");'を実行し、次に最も長い単語を見つけるために配列を使用する必要があります(ヒント:配列を繰り返し、 '.length ')しかし、私はあなたの質問がここで歓迎されていないと信じています:( –
文章の中で最も長い単語を見つけるために何をしたらよいかを記述しようとすると、' split( "")あなたの質問を解決するための答えが本当にはっきりしていないので、これはStackOverflowのトピックではないかもしれません。 – Aurora0001