阅读背景:

使用Math符号作为动态变量?

来源:互联网 
BEE = 20;
STACKMENOW = 10;
TYPE = 1; // (1 = ADDITION, 0 = SUBSTRACTION)

NEWVALUE  = BEE (TYPE? + : - ) =STACKMENOW;

console.log(NEWVALUE); // This should be  30 if the TYPE is 1, and 10 if the type is 0, is this possible?
BEE = 20;
STACKMENOW = 10;
TYPE = 1; // (1 = AD



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: