here is a part of js code where i am trying to check this condition what if it has data but not of the right type or value? it already has this if condition can you guys tell me how to chk it providing my code below..
setcurrentFruit : function (fruitName, currentFruit) {
WorklistStorage.set(fruitName, currentFruit, false);
},
getcurrentFruit : function (fruitName) {
var currentFruit = unescapeJSON(WorklistStorage.get(fruitName, false));
**if (currentFruit == "undefined" || typeof currentFruit == "undefined") {**
var date = new Date();
currentFruit = date.toString();
wholeQueue.setcurrentFruit(fruitName, currentFruit);
//console.log("poppppp");
}
currentFruit = new Date(currentFruit);
return currentFruit;
},