Jump to content
Sign in to follow this  
amol rajhans

problem in JavaScript documentation and report error related API is not working after submit

Recommended Posts

Hello There,

As I was going through your documentation of W3C for javascript. I would like to suggest one change in documentation.

As per your Javascript documentation of https://www.w3schools.com/js/js_performance.asp (Reduce Activity in Loops)

Bad code is as follows:
var i;
for (i = 0; i < arr.length; i++) {

Better Code:
var i;
var l = arr.length;
for (i = 0; i < l; i++) {

But in URL (https://www.w3schools.com/js/js_htmldom_elements.asp) >> Finding HTML Elements by HTML Object Collections.

In this example:

var x = document.forms["frm1"];
var text = "";
var i;
for (i = 0; i < x.length; i++) {
  text += x.elements.value + "<br>";
document.getElementById("demo").innerHTML = text;

From above example the highlighted line  should be replaced with Better code.

Also after filling form for Report Error on page https://www.w3schools.com/js/js_htmldom_elements.asp
and when i click on submit below API gives me error like

API https://www.w3schools.com/err_sup.asp

"We cannot find the page you are looking for.
It might have been removed, had its name changed, or is temporarily unavailable. 
Please check that the Web site address is spelled correctly."

Please let me know, if I could help you here.



Amol Rajhans

Share this post

Link to post
Share on other sites

Unfortunately, the staff rarely visits the forums.

As far as taking length calls out of the loop, it's a negligible performance impact in 99% of situations. If you were writing a heavy time-critical application this would be one of the optimizations you could do to improve it if you find that it's running slow.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...