+ 2

Q re Q & A search results

If I'm doing a search in Q & A, is there anyway to limit results to only those containing all search strings? eg, I just did the following search: "Javascript newline" Given 'Javascript' is such a common tag, there were too many results for it to be useful. Bonus points if someone can tell me how to do a newline in Javascript. I tried the following but it didn't work. document.write(\n); and document.write("\n"); The code I'm working on is included here and relates to one of the lessons. https://code.sololearn.com/WULet9nDUjbz/?ref=app

30th May 2018, 7:20 AM
Duncan
Duncan - avatar
3 Answers
+ 6
document.write() writes html content to the document. Therefore, you should use HTML markup. document.write("<br>");
30th May 2018, 7:30 AM
Jonathan Pizarra (JS Challenger)
Jonathan Pizarra (JS Challenger) - avatar
+ 6
Unfortunately i'm not aware of any such method it's basic search only. you can try using a search engine instead, it can give better results. Simply type your query then add sololearn after it. https://duckduckgo.com/?q=javascript%20newline%20sololearn Now for the newline part replace '\n' with '<br>' sayHello("John", 20); document.write("<br>"); sayHello("Duncan");
30th May 2018, 7:37 AM
Lord Krishna
Lord Krishna - avatar
+ 3
Thank you Jonathan Pizarra and Lord Krishna. I've updated the code with <br> and also found an application for when \n does work. Code updated. Thanks for the link Lord Krishna, that site will come in handy. Shame you can't force the SoloLearn search to do the same.
30th May 2018, 11:23 AM
Duncan
Duncan - avatar