Advertisement
joaopaulofcc

Untitled

Nov 24th, 2021
1,199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var x = 10, y = 10;
  2.  
  3. if (x == y) {
  4.     console.log('x == y');
  5. }
  6.  
  7. if (x == 10) {
  8.     console.log('x == 10');
  9. }
  10.  
  11. if (x == '10') {
  12.     console.log('x == 10 (texto)');
  13. }
  14.  
  15. if (x === y) {
  16.     console.log('x === y');
  17. }
  18.  
  19. if (x === 10) {
  20.     console.log('x === 10');
  21. }
  22.  
  23. if (x === '10') {
  24.     console.log('x === 10 (texto)');
  25. }
  26.  
  27.  
  28. x = 11, y = 12;
  29. if (x != y) {
  30.     console.log('x != y');
  31. }
  32.  
  33. if (x != 10) {
  34.     console.log('x != 10');
  35. }
  36.  
  37. if (x != '10') {
  38.     console.log('x != 10 (texto)');
  39. }
  40.  
  41. if (x !== y) {
  42.     console.log('x !== y');
  43. }
  44.  
  45. if (x !== 10) {
  46.     console.log('x !== 10');
  47. }
  48.  
  49. if (x !== '10') {
  50.     console.log('x !== 10 (texto)');
  51. }
  52.  
  53.  
  54. x = 11, y = 10;
  55. if (x > y) {
  56.     console.log('x > y');
  57. }
  58.  
  59. if (x > 10) {
  60.     console.log('x > 10');
  61. }
  62.  
  63. if (x >= y) {
  64.     console.log('x >= y');
  65. }
  66.  
  67. if (x >= 10) {
  68.     console.log('x >= 10');
  69. }
  70.  
  71.  
  72. x = 9, y = 10;
  73. if (x < y) {
  74.     console.log('x < y');
  75. }
  76.  
  77. if (x < 10) {
  78.     console.log('x < 10');
  79. }
  80.  
  81. if (x <= y) {
  82.     console.log('x <= y');
  83. }
  84.  
  85. if (x <= 10) {
  86.     console.log('x <= 10');
  87. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement