I’m currently doing this:
var data; // fetched from DB if (data != null && data != ‘’) { // do something } Is there a cleaner or better approach to verify that JavaScript is not null and also not an empty string? Appreciate any tips!
I’m currently doing this:
var data; // fetched from DB if (data != null && data != ‘’) { // do something } Is there a cleaner or better approach to verify that JavaScript is not null and also not an empty string? Appreciate any tips!