4. // Write an if/else statement such that if `varA` and `varB` are strings or // numbers and they have equal values, then change the value of answer4 to // "varA and varB are equal" // otherwise assign a value of "varA and varB differ" function exercise4(varA, varB) { let answer4; // -------------------------------------------- // Write your code for the exercise below here: // -------------------------------------------- // -------------------------------------------- // And above here // -------------------------------------------- return answer4; } 5. // In exercise 4, what are some of the unexpected cases where `varA` and `varB` // seemed like they are equal, but would not pass the tests? Consider other data types beside strings and variables. plase answer in javascript
/ 4. // Write an if/else statement such that if `varA` and `varB` are strings or // numbers and they have equal values, then change the value of answer4 to // "varA and varB are equal" // otherwise assign a value of "varA and varB differ" function exercise4(varA, varB) { let answer4; // -------------------------------------------- // Write your code for the exercise below here: // -------------------------------------------- // -------------------------------------------- // And above here // -------------------------------------------- return answer4; }
5. // In exercise 4, what are some of the unexpected cases where `varA` and `varB` // seemed like they are equal, but would not pass the tests? Consider other data types beside strings and variables.
plase answer in javascript
Step by step
Solved in 5 steps with 2 images