Closed frankcollins3 closed 1 year ago
makes more sense now. .Replace() would have to be called on the quantity string, not the input string. given this mention, if these are both string mutating values, a callback function is a good idea.
perform multiple mutations on the input string and then set quantity to be the final value that will be used [5:52pm]
explaining the going-ons further: quantity is redeclared to be the original string without the .Remove() being applied to it. [5:57pm]
that assumption is wrong. it does not mutate the original string. subsequent method invocations to be performed on {quantity} not {input}, and with reassignment not declaration [5:58pm]
have to clean it up but this works: [6:00pm]
attempting to do: remove
<div>
tags and replace &trade with ® in this picture, the div tags are removed, seemingly because the .Replace() method isn't being used.error: .Remove() isn't eliminating the
<div>
when the .Replace() method is also called upon the string.proposed approach: callback function.
possible improvements: