finally syntax helps

function working for array question 2.