I was just working on some code and caught myself making this error
if (stringName == "firstName" || "lastName")
// Do code
obviously this is wrong and should be
if (stringName == "firstName" || stringName == "lastName")
// Do code
but it just got me thinking in regards to readability would the first be easier? Maybe having some logic that could say unless a new stringName is specified, use the first one?
Really not a question, Im just curious if there is something I dont fully comprehend on the logic behind compiling a statement like this.