tags:

views:

63

answers:

1

This means "if exist"

if($.cookie("movies_list")) {
// do something
}

How to write "if not exist" without changing the structure?

+10  A: 

Prepend the not operator !

if(! $.cookie("movies_list")) {
// do something
}

! Operator

Sarfraz