Hi all, I'm new to this forum and really looking forward to learning from you all but also as I improve help others as well.
I just have a query about comparing strings.
Code A outputs correct Boolean value (tested with other strings and still returns correct result)
Code B only outputs false regardless of whether the strings are the same or not.
(see codes below)
I think if I'm understanding this correctly, the comparison operator compares objects and not values when it comes to strings which is fair enough, but I really don't understand why A works and not B. The only difference is how the variables are being input, right?
Any enlightenment on this would be amazing! Thanks in advance.