I have this code:
var sideBar = localStorage.getItem(\'Sidebar\');
I want to check if sideBar is defined and not null in an if statement. I am
If statements can be joined using &&
It is advisable to use '==='. e.g. if (sideBar === undefined && sideBar !== null)
http://www.w3schools.com/jsref/jsref_undefined.asp