I am creating a project using angularjs.I have variable like
$scope.test = null $scope.test = undefined $scope.test = \"\"
I want to check all
You can do
if($scope.test == null || $scope.test === ""){ // null == undefined }
if false, 0 and NaN can also be considered as false values you can just do
false
0
NaN
if($scope.test){ //not any of the above }