user1537415
user1537415

Reputation:

Problems with javascript

I'm experimenting with localstorage, and I have the following snippet, and I wonder why it won't do anything.

    var tuotteita = localStorage.getItem("simpleCart_items");
    if(tuotteita != NULL){
    alert(tuotteita);
    }

It looks fine to me?

Upvotes: 0

Views: 62

Answers (1)

balafi
balafi

Reputation: 2153

use null instead of NULL (lowercase)

Upvotes: 2

Related Questions