Is byref allowed in JS ? function isValidEmail(emailStr, byref reason) { reason='abc' return false // is something like this possible }