Question from the Javascript test

Write a function that returns true if the input string starts with 'fo' followed by 'bar' or 'baz'.

Hard

Which call(s) to the following function returnstrue?

function isAFooBar(str) {
  return !!str.match(/^fo+(bar|baz)/);
}
Author: Loutre magnifiqueStatus: Published(Update)Question passed 186 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!