If I have the following code written where i'm trying to interchange between failedIds
and passedIds
:
hideShowTestResults: function(failOrPass){
if(this.[failOrPass ? passedIds : failedIds ].length > 0){}
}
Yet this syntax is not accepted in JS, how would I go about this?
Thanks, Bud