vendredi 26 avril 2019

if runs with 9 >= 10? [duplicate]

This question already has an answer here:

I am making a mistake or something strange is going on but I am not seeing it.

localStorage value = 9

if (localStorage.getItem('TotalProducts') >= '10') {
  alert('total products'+localStorage.getItem('TotalProducts'));
}

Why am I receiving the alert?

Alert content is total products9

Aucun commentaire:

Enregistrer un commentaire