0

can't answer this question

var arr = . getElementsByTagName(" "); for(var x=0; x<arr.length; x++) { arr[ ].innerHTML="SoloLearn"; }

30th Jun 2017, 7:11 AM
John Iroc
John Iroc - avatar
13 Respuestas
+ 7
1st blank=document 2nd blank=p 3rd blank=x
12th Jul 2017, 7:16 AM
Samriddha Prajapati
Samriddha Prajapati - avatar
+ 5
First, it's JavaScript, not html, but never mind. The code searches and collects all elements in html page having the specified tag name that you pass to the getElementsByTagName() function. I noticed the tag name is empty string, not sure what you mean by that. The matching elements are stored in an array variable named var. Next the code iterates through the array (of elements) changing each of their text to "Sololearn". The iteration is also missing iterator inside the loop, so it should've been like: for(var x=0; x<arr.length; x++) { arr[x].innerHTML="SoloLearn"; } Hth,
6th Jul 2017, 4:59 AM
Ipang
+ 3
1st blank = div 2nd blank = 2
13th Jan 2019, 11:09 PM
Elisheba
+ 2
1st ->document 2nd->p 3rd->x
19th Aug 2017, 9:57 AM
Asraf
+ 2
answer: 1st blank= document 2nd blank= p 3rd blank= x Thankyou
24th Mar 2020, 8:47 AM
Raj Srivastava
Raj Srivastava - avatar
+ 1
var arr = document . getElementsByTagName(" p "); for(var x=0; x<arr.length; x++) { arr[ x ].innerHTML="SoloLearn"; }
20th Feb 2018, 1:38 PM
SAYANTA SINGHA ROY
SAYANTA SINGHA ROY - avatar
+ 1
1st blank-->div 2nd blank-->x
11th Aug 2018, 4:00 AM
dhana sekar
dhana sekar - avatar
+ 1
1st blank="div" 3rd element=2
12th Jun 2019, 8:59 AM
Eric Munene
Eric Munene - avatar
+ 1
1st blank=>img 2nd blank=>length 3rd blank=>src No shitty
4th Aug 2019, 6:35 PM
Cheddad Zoher
+ 1
document p x
16th Sep 2019, 9:41 AM
ISINGIZWE GASANA Aline
ISINGIZWE GASANA Aline - avatar
+ 1
div and 2
16th Mar 2020, 12:07 PM
Dipak Saha
Dipak Saha - avatar
+ 1
div 2
29th Jul 2020, 3:34 PM
kedir.y
kedir.y - avatar
0
var arr = document.getElementsByTagName("img"); for(var x=0; x<arr.length; x++) { arr[x].length = "demo.jpg"; }
14th May 2019, 1:29 PM
Kris O. Ouko
Kris O. Ouko - avatar