20
rated 0 times
[
25]
[
5]
/ answers: 1 / hits: 55172
/ 11 Years ago, tue, february 4, 2014, 12:00:00
Setting attributeTwo using an if statement. What is the correct way to do this?
var testBoolean = true;
var object = {
attributeOne: attributeOne,
attributeTwo: if (testBoolean) { attributeTwo } else { attributeTwoToo },
}
More From » javascript