1// simple check do the job
2if (myString) {
3 // comes here either myString is not null,
4 // or myString is not undefined,
5 // or myString is not '' (empty).
6}
1if( value ) {
2 //
3}
4
5/**
6* This will evaluate to true if value is not:
7* null
8* undefined
9* NaN
10* empty string ("")
11* 0
12* false
13*/