标签: javascript
您能告诉我这段JavaScript代码是什么意思吗?
const TRUE = x => y => x; const FALSE = x => y => y; const IFELSE = p => a => b => p(a)(b); console.log(IFELSE(TRUE)('1')('2')); // The result is: 1 console.log(IFELSE(FALSE)('1')('2')); // The result is: 2