Back to portfolio

JAVASCRIPT OPERATORS

Super Calculator

Compare what JavaScript does with numbers and text. Choose two inputs and an operator, then calculate the result.

Arithmetic
Text
Comparisons

Result

Expression

Choose your inputs above.

Returned value

—

This shows JavaScript's own results, including NaN for invalid numeric operations and Infinity when dividing a non-zero number by zero.

How it works

Enter two values, choose their types and select an operator to see the result.

The script converts each input to a number or string, applies the selected operator and displays the expression and result as text. Try 5 as a number and 5 as a string with == and === to compare the results.

Concepts: Type conversion, arithmetic, string operations and comparisons.