Edit in JSFiddle

const add = (a, b) => {
  return a + b
}

if (add(1, 1) === 2) {
  document.write('pass')
} else {
  document.write('fail')
}