Posts by Diego Barros • 126 points
4 posts
-
8
votes1
answer36
viewsA: Why can’t I use add operator in function with this?
This happens because the this in the function within the setTimeout no longer refers to Person but the anonymous function you defined. You have two alternatives to this scenario: 1 - Save reference…
-
0
votes2
answers95
viewsA: bug in function with appendchild
Your while is in an infinite loop, missing increment variable x. while (x <= times) { parent.appendChild(child); x += 1; }; And from what I understand of your code the right thing would be for…
-
0
votes2
answers235
viewsA: Matrix 3x3 in PHP, how to show only the elements of the tips
To recover the ends no need to do a for, just go straight into the positions you want. // Primeira coluna da primeira linha $matriz[0][0]; // Última coluna da primeira linha…
-
0
votes2
answers1140
viewsA: How to save information from an html text box to a javascript variable?
You can split the text to retrieve in array form the values that are separated by space (in this case) <html> <body> <h3>Entre com sua aposta para mega sena (Com 6…