Untitled

mail@pastecode.io avatar
unknown
javascript
2 years ago
414 B
2
Indexable
Never
const ctArray = [CT1, CT2, CT3];
var CT1 = {displayValue: "CT1", Value: "true"}
var CT2 = {displayValue: "CT2", Value: "false"}
var CT3 = {displayValue: "CT3", Value: "true"}


/***CT[0] = CT1.Value
CT[1] = CT2.Value
CT[2] = CT3.Value
***/

function ctTrue (ctArray) {
    for (var CT in ctArray) {
        if (CT.Value = 'true') {
            return(CT.displayValue)
        }
    }
}

ctTrue()