Hi guys,
I’m stuck on line 8 of my code (“checkA === checkB”). It should return the result of the callback function if true. I´ve tried to put “func(val)” or “checkA” or “checkB()” but in vain. Where is the problem? Thank you in advance!
https://www.codecademy.com/courses/introduction-to-javascript/lessons/higher-order-functions/exercises/functions-as-parameters
type or paste code here
const addTwo = num => {
return num + 2;
}
const checkConsistentOutput = (func, val) => {
let checkA = val + 2;
let checkB = func(val);
checkA === checkB ? func(val) : 'inconsistent results';
}
console.log();