Home > front end >  Of new directions, this problem can't write
Of new directions, this problem can't write

Time:09-15




<meta charset="UTF-8">
String methods & lt;/title> <br/></head> <br/><body> <br/><script> <br/>Var sum=[" JavaSpcript belongs to web scripting language! JavaSpcript by millions of web pages to improve design, verification form, <br/>Check the browser, create cooikes, and more applications. JavaSpcript is the Internet's most popular scripting language! JavaSpript easily <br/>Use! You will like it!" ] ;//this is input a string of words right? <br/>Var J=[]; <br/>for(i=0; i<J.l ength; I++) {<br/>If (I=='J') <br/>JavaScript is the first document. Write (' '+ sum. The charAt (I) +' a '+' appearance is in "+ sum. The charCodeAt (I) + 'the location of the' + '& lt; br/> '); <br/>} <br/>Document. Write (' JavaScript '+' in this passage + sum. Slice (I) + 'a' + '& lt; br/> '); <br/><br/><br/></script> <br/></body> <br/></html><p class="article - content rp"> CodePudding user response: </p><pre> <br/>Var sum="JavaSpcript belongs to web scripting language! JavaSpcript by millions of web pages to improve design, verification form, check browser, create cooikes, and more applications. JavaSpcript is the Internet's most popular scripting language! JavaSpript is easy to use! You will like it!" ;//as input a string of words on here?" <br/>Var j=0 <br/>For (the let I=0; i <The sum. Length; I++) {<br/>If (sum. CharAt (I)=='J') {<br/>J++ <br/>Document. Write (' JavaScript is the first '+ j + +' times' "appeared in" + I + '-' + (I + 1) + 'the location of the' + '& lt; br/> '); <br/>} <br/>} <br/>Document. Write (' JavaScript '+' in this passage + j + 'a' + '& lt; br/> '); <br/></pre><p class="article - content rp"> CodePudding user response: </p>Turned out to be like this, thank you so much <img SRC="https://img.codepudding.com/202009/73569152137592.gif" Alt=""/><p class="article - content rp"> CodePudding user response: </p><fieldset> <legend> reference 1st floor jio can reply: <legend> <blockquote> <pre> <br/>Var sum="JavaSpcript belongs to web scripting language! JavaSpcript by millions of web pages to improve design, verification form, check browser, create cooikes, and more applications. JavaSpcript is the Internet's most popular scripting language! JavaSpript is easy to use! You will like it!" ;//as input a string of words on here?" <br/>Var j=0 <br/>For (the let I=0; i <The sum. Length; I++) {<br/>If (sum. CharAt (I)=='J') {<br/>J++ <br/>Document. Write (' JavaScript is the first '+ j + +' times' "appeared in" + I + '-' + (I + 1) + 'the location of the' + '& lt; br/> '); <br/>} <br/>} <br/>Document. Write (' JavaScript '+' in this passage + j + 'a' + '& lt; br/> '); <br/></pre> </blockquote> <fieldset> <br/>Or not, the browser shows don't come out, the code error<p class="article - content rp"> CodePudding user response: </p><img SRC="https://img.codepudding.com/202009/73569152137593.png" Alt=""/> </div> <div class="th_page th_page_color"></div> <div class="umCopyright"> <p>Page link:<a href="/frontend/1072.html" target="_blank" style="color:#999">https//www.codepudding.com/frontend/1072.html</a></p> </div> <div class="detail-arr"> <div class="detail-arr-left">Prev:<a href='/frontend/1071.html'>Cross-domain whole crazy company trainee, please help</a></div> <div class="detail-arr-right">Next:<a href='/frontend/1073.html'>Js array object sort of problem</a></div> </div> </div> </div> </div> </div> <div class="container th_top"> <div class="row"> <div class="col-md-12"> <div class="hot-tags neitags"> <ul> <li><i class="iconfont icon-x-tags"></i> Tags:  </li> <a href='/e/tags/?tagname=JavaScript' target='_blank'>JavaScript</a> </ul> </div> </div> </div> </div> <div class="container th_top"> <div class="row"> <div class="col-md-12"> <div class="xiangguan"> <ul class="msg msghead"> <li class="tbname">Related</li> </ul> <ul> </ul> </div> </div> </div> </div> <div class="container th_top"> <div class="row"> <div class="col-md-12"> <div class="flinks"> <ul> <li><i class="iconfont icon-x-tags"></i> Links:  </li> <li class="liflinks"><a target="_blank" href="/" title="CodePudding">CodePudding</a></li> </ul> </div> </div> </div> </div> <div class="footer"> <p><span style="font-size:16px;color:#666;font-weight: bold">About Us:</span>  <a href="https://www.codepudding.com/contact.html">Contact Us</a>      <a href="https://www.codepudding.com/service.html">Terms of Service</a>      <a href="https://www.codepudding.com/privacy.html"> Privacy Policy</a></p> <p class="foot_info">Copyright © 2010-2023,Powered By <a href="/" target="_blank">CodePudding</a> </p> </div> <script type="text/javascript" src="/skin/code/tianhu.js"></script> </body></html>