
Larry C. answered 03/18/19
Tutor
4.9
(294)
Computer Science and Mathematics professional
Look at it this way: "as expected" is a descriptive phrase that could be eliminated without substantially affecting the action-result information of "She tried and failed." As such, it is set off with commas by "She tried and, as expected, failed."