如何连接变量名称

时间:2018-01-31 13:01:38

标签: javascript ecmascript-6

我希望以下调用我的函数

MakeMargin(unit1)

输出以下变量(不是字符串!):

theme.spacing.unit1

我尝试了以下内容:

function MakeMargin(props) {
  const output = theme.spacing + props

  return (
    output
  );
}

1 个答案:

答案 0 :(得分:2)

应该是:

Architecture - 32 bit or 64 bit or 86 bit
compiler version - VC9 or VC11 or VC14
Thread safe or Non thread safe
相关问题