countorderedchairs

CF

function countOrderedChairs

The function/method countOrderedChairs accepts an argument str representing a string value. The string str contains only…