Working a evaluator for Polish Notation and I was adding a way to distinguish if the string I got was a number or not using the isNaN function. This works fine, until you add + + to the string.
function cuttingString(list) {
let adjustArr = list.split(' ')
let topper = []
for (let i = 0; i < adjustArr.length; i++) {
if (!isNaN(adjustArr[i])) {
topper.push(adjustArr[i])
console.log(topper)
} else {
let j = topper.pop()
let k = topper.pop()
if (adjustArr[i] === '+') {
topper.push(parseInt(j) + parseInt(k))
}
}
}
}
console.log(cuttingString('* 1 2 30 +'))
works as expected with '* 1 2 30 +'
it outputs [1,2,30]
However, when I start moving around the operators, is when I get a NaN in the beginning of my arrays [NaN, 1,2,30]
which is incredibly frustrating. Any ideas on how to fix this problem or other work arounds?
prednisone brand name cost – deltasone otc prednisone 477
modafinil interactions – buy modafinil online modafinil side effects
buy amoxicillin 500 – buy amoxicilin 500 mg india amoxil 500mg
buy stromectol for humans – stromectol ivermectin
ivermectin buy online – stromectol us ivermectin 0.5% lotion
best place to buy ed pills online – natural remedies for erectile dysfunction ed pill
viagra best price usa – order viagra online without viagra citrate 130mg
order viagra online without a preion – how to buy viagra online in india
prednisone 10 mg canada – where to buy prednisone in australia prednisone 2.5 mg cost
viagra 120mg – Viagra or cialis 100mg sildenafil 1 pill
prednisone 200 mg – prednisone tablets prednisone 5mg price
tadalafil 20mg – tadalafil 20mg tadalafil 5 mg
711570 142007Having a look forward to see you. 870448
generic it vardenafil – buytopep.com ed medications
plaquenil hydroxychloroquine sulfate – prednisone 5mg tablets prednisone brand name
buy viagra for female online india – sildenafil 20 mg order prescription viagra online
60 mg viagra – Viagra order viagra capsules in india
prednisone 5 mg cheapest – buy prednisone online canada without prescription prednisone 2 mg
snorting cialis mail order cialis
217920 141498I like this site extremely significantly so considerably superb info. 109299
cialis canada org doc cialis effects
levitra effects levitra company
term paper on mri violent video games term paper
thesis binding melbourne uni rajiv gandhi medical college thesis topics
tadalafil online with out prescription tadalafil brands
https://cialismat.com/ cost of cialis
tadalafil generic where to buy tadalafil cost walmart
tadalafil side effects https://cialiswbtc.com/
buy tadalafil cialis without prescription
cialis tadalafil tadalafil cost walmart
buy viagra without prescription online pharmacy viagra
buy viagra online at viagra alternative
cheap cialis cialis pills
п»їcialis tadalafil cialis
tadalafil cost in canada tadalafil brands
canada generic tadalafil side effects of tadalafil
ivermectin tablets for sale stromectol 3 mg tablets buy stromectol
buy 6 mg ivermectin stromectol 3 mg tablets
https://www.ivermectinoge.com/ stromectol mexico
over the counter female viagra pill compare viagra buy viagra for female
generic cialis tadalafil cialis mit paypal bezahlen cialis one a day with dapoxetine canada
purchase cheap viagra generic viagra pills cheap buy viagra online united states
cialis samples goodrx tadalafil cialis daily price
where to buy cialis online tadalafil citrate cialis side effects with alcohol
order sildenafil 100mg cost of viagra 2017 sildenafil 100mg for sale uk
cialis without prescription cialis sublingual cialis patent expiration 2016
Amaryl Brand Viagra Penegra
Zanaflex Caverta Risperdal