mercredi 7 octobre 2015

How to write if ,else block for multiple conditions?

I am new to javascript what is right way to write if and else block with below code i am getting an error on else condition that syntax is not correct. Please let me know what i have implemented wrong.

main.js

if(dataRow.opriskYesNo==='Yes'){
                $scope.opRiskCompleted = 'Y';
                }
                else if(dataRow.opriskYesNo==='No'){
                    $scope.opRiskCompleted = 'N';
                    }
                else (dataRow.opriskYesNo === ''){
                  $scope.opRiskCompleted = '';
                  $scope.opRiskCompleted = '';
                }

Aucun commentaire:

Enregistrer un commentaire