Adding numbers


1 comment

  • 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.

    Comment actions Permalink

Please sign in to leave a comment.