Currently, I am conducting a comparison between the value of a checkbox and the values within an array of strings. The process involves printing out each comparison for analysis, as shown below:
checkSkillLevel(index: number, level: string){
console.log(this.currentAdditionalInfo.skills[index].level + "=" + level + " ?");
console.log("boolean: " + this.currentAdditionalInfo.skills[index].level == level);
}
During one of the comparisons, the checkbox value is "low" while the array value is also "low". I attempted comparing them using `===` as well. Despite this, both scenarios resulted in false outcomes, as illustrated in the log:
https://i.sstatic.net/FULom.png
What could be causing this discrepancy? I even ran the same comparison in an online playground where it yielded `true`.