Loose or strict equality
You are given n pairs of values.
Each value is a token you could write directly in JavaScript code: an integer (for example 5, -12, -0), a string in double quotes (for example "5", "", "abc"), or one of true, false, null, undefined, NaN.
Turn both tokens into those JavaScript values a and b, and print one line per pair: "===" if a === b is true, otherwise "==" if a == b is true, and "!=" if both are false.
- Input
- First line n (1 ≤ n ≤ 1000), then n lines with two tokens separated by one space.
Integers are between -1000 and 1000 and have no leading zeros except 0 itself (-0 may appear).
Inside the quotes a string is empty, or only 1 to 4 digits (a leading 0 is allowed), or only 1 to 5 lowercase letters.
There are no spaces inside quotes. - Output
- n lines, each one of ===, ==, !=
5 5 "5" "5" "5" NaN NaN null undefined false "0"
== === != == ==
4 null 0 0 -0 "" 0 true "abc"
!= === == !=