Why else statement does not work in my JavaScript code ? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 4

Why else statement does not work in my JavaScript code ?

I tried a lot of times. But didn't get the reason , why is that not work , actually this doubt is for another project. . so anyone explain me please https://code.sololearn.com/Whohy3x58j37/?ref=app

20th Apr 2021, 4:57 AM
ShamsuCm
14 Antworten
+ 10
.getElementsByClassName returns HTMLCollection So you need to loop through the collection to get individual input. https://code.sololearn.com/WS2zECl0LUKN/?ref=app
20th Apr 2021, 9:39 AM
Ernest Brayce
Ernest Brayce - avatar
+ 4
you can mark it as correct answer
20th Apr 2021, 11:46 AM
Ernest Brayce
Ernest Brayce - avatar
+ 4
Anytime
20th Apr 2021, 12:02 PM
Ernest Brayce
Ernest Brayce - avatar
+ 3
I don't even know Maybe from the three vertical dots
20th Apr 2021, 11:56 AM
Ernest Brayce
Ernest Brayce - avatar
+ 3
Lol you did it cool
20th Apr 2021, 11:56 AM
Ernest Brayce
Ernest Brayce - avatar
+ 2
You see a separator bar with text like "4 ANSWERS" and sorting option? that bar acts as separator between the question section (above the bar) and the answers section (below it).
20th Apr 2021, 10:18 AM
Ipang
+ 2
Ernest Brayce may i send you personal message , because I have another doubt in that code. So I think it's not good to post like that small doubts,. So can I come in your inbox ??
20th Apr 2021, 12:02 PM
ShamsuCm
+ 1
Tell me what the button supposed to do. And as future reference, avoid writing into answers section. People might mistaken you have got answer, and you end up getting no response due to the misunderstanding.
20th Apr 2021, 9:05 AM
Ipang
+ 1
Ipang Answers section ?? I have no experience in ask questions in this app .. So could you tell me , or explain to me , where can I writing question? I mean if it's answers section ., Then where is the question section. ??
20th Apr 2021, 10:14 AM
ShamsuCm
+ 1
Ipang got it ­čśä­čśä . In facebook or other social media the "..." Normally using people for reach the post. . When anyone doesn't look at their post , they will using self comment their own post , so it will seeing lot of people , I borrowed that idea here. ­čśä­čśä
20th Apr 2021, 11:45 AM
ShamsuCm
0
Ernest Brayce i check it now. . Thanks ,... It's work. .­čśŹ Really thanks.
20th Apr 2021, 11:45 AM
ShamsuCm
0
Ernest Brayce sure , . But how. ??
20th Apr 2021, 11:53 AM
ShamsuCm
0
Yeah , . I did it. .
20th Apr 2021, 11:57 AM
ShamsuCm
0
Actually here you are getting two value from both the input tag... So here you have to index it individually to get the values... https://code.sololearn.com/WnkfJ9tkv3LE/?ref=app
21st Apr 2021, 2:03 PM
Shivam Singh
Shivam Singh - avatar