The question I’m doing is:
Write a JS program which takes 1 input from the user: a sentence (string). The program contains a function which converts the vowels (a,e,i,o,u) in the string to uppercase and consonants (non-vowel characters) into lowercase. Sample Input: string = “Learn programming and start earning”. Expected Output = “lEArn prOgrAmmIng And stArt EArnIng”. Your output code should be in the format console.log(“Result is “, Output variable).
And my code is:
var sentence=prompt("Enter the sentence");
function convert(x){
var a = x.split('');
for( var i=0 ; i<a.length ; i++){
if(a[i]=="a"){
a[i] = a[i].toUpperCase();
}
else if(a[i]=="e"){
a[i] = a[i].toUpperCase();
}
else if(a[i]=="i"){
a[i] = a[i].toUpperCase();
}
else if(a[i]=="o"){
a[i] = a[i].toUpperCase();
}
else if(a[i]=="u"){
a[i] = a[i].toUpperCase();
}
else{
a[i] = a[i].toLowerCase();
}
}
var b = a.join('');
return b;
}
var output = convert(sentence);
console.log("Result is ", output);
It doesn’t look good but provides output. However, it does not pass all test cases according to the webapp. What am I doing wrong?
provigil 100mg – modafinil addiction provigil a drug
cheap viagra 200mg – sildenafil 50 mg best price sildenafil 100mg price australia
cialis 4 mg – cialis no rx average cost of cialis for daily use
buy ivermectin for humans uk – stromectol 12mg ivermectin generic cream
parx casino online – real money casino slot games online
can i buy prednisone over the counter in usa – buy prednisone 40mg prednisone buy canada
sildenafil citrate tablets 100 mg – sildenafil fast delivery buy viagra cheapest price
ivermectin 5ml – ivermectin medication ivermectin tablets for sale walmart
neurontin 300 mg buy – neurontin 800 mg tablets best price levothyroxine 200 mcg tabs
cheapest vardenafil online – vardenafil non generic brand vardenafil online pharmacy
roaccutane without a prescription – where can i get accutane online accutane in uk
methylprednisolone 2mg price – lyrica 175 mg lyrica south africa
help with assignments australia – cheap essay services cheap essay online
where can i buy ivermectin – generic stromectol for humans ivermectin over the counter
prednisone medicine – prednisone 10mg pack indian prednisone without prescription
cytotec 200 mg – generic cytotec where to buy cytotec in canada
generic ivermectin – ivermectin 6mg online ivermectin 10 ml
So kaufst du tiktok follower
how to write a hiring letter – help with term papers essays done for you
sildenafil 130mg pills – Buy cialis next day delivery tadalafil best buy
buy cheap generic vardenafil online – vardeed.com ed pills that work
buy viagra from india – real viagra 50mg canadian pharmacy viagra online
471547 230605There is noticeably a bundle to learn about this. I assume you made specific nice points in functions also. 713436
prednisone online sale – prednixone tables for sale prednisone by mail
online casinos for usa players – real money slots real online casino
ampicillin 250mg cost – order ampicillin online plaquenil 200mg brand
purchase hydroxychloroquine pill – hydroxychloroquine cost plaquenil 200mg us
https://cialisvet.com/ tadalafil online
where to order tadalafil tablets best price usa tadalafil
cheapest tadalafil cost what is tadalafil
cialis tadalafil tadalafil order online no prescription
https://cialistrxy.com/ cost tadalafil generic
cialis tadalafil buy generic cialis online with mastercard
lowest price cialis what is tadalafil
https://cialismat.com/ generic tadalafil from uk
57438 741263good post. Neer knew this, thanks for letting me know. 601491
side effects of tadalafil cheap cialis pills for sale
cost tadalafil generic cost tadalafil generic
tadalafil online with out prescription cost of cialis
cialis cost generic cialis online fast shipping
cost of cialis cialis at canadian pharmacy
cost of cialis cheapest tadalafil cost
cialis without a prescription best price usa tadalafil
stromectol how much it cost https://www.ivermectinusd.com/
stromectol 12mg online ivermectin online buy 12mg ivermectin
buy ivermectin canada