Adding numbers

评论

1 条评论

  • Avatar
    AgilePoint NX Support

    Laurie, it's JavaScript nature to interpret the type of data and preform the operations. A simple trick would be to add one of the operand as a string.

    e.g. answer = num1 + '' + num2;

    the empty '' is an empty string which make JavaScript to consider the expression as string concatenation.

    0
    评论操作 固定链接

请先登录再写评论。