2 ms·
I like how the author just re-invented if statements. Even still called them "if". Compare: [snip] { title: 'Has the user searched yet?', test: !!pa
by shaftway 10y ago
I like how the author just re-invented if statements. Even still called them "if". Compare:
[snip] {
title: 'Has the user searched yet?',
test: !!pageData.searchKeyword,
if: {
true: {
[snip]
},
false: {
[snip]
},
},
}, [snip]
vs.
// Has the user searched yet?
[snip] if (decisionData.searchKeyword) {
[snip]
} else {
[snip]
}
I expected something like a state machine, instead of OOJSON.