freeCodeCamp/curriculum/challenges/arabic/02-javascript-algorithms-an.../basic-javascript/practice-comparing-differen...

1014 B

id title challengeType videoUrl localeTitle
599a789b454f2bbd91a3ff4d Practice comparing different values 1

Description

undefined

Instructions

undefined

Tests

tests:
  - text: ''
    testString: 'assert(compareEquality(10, "10") === "Not Equal", "<code>compareEquality(10, "10")</code> should return "Not Equal"");'
  - text: ''
    testString: 'assert(compareEquality("20", 20) === "Not Equal", "<code>compareEquality("20", 20)</code> should return "Not Equal"");'
  - text: ''
    testString: 'assert(code.match(/===/g), "You should use the <code>===</code> operator");'

Challenge Seed

// Setup
function compareEquality(a, b) {
  if (a == b) { // Change this line
    return "Equal";
  }
  return "Not Equal";
}

// Change this value to test
compareEquality(10, "10");

Solution

// solution required