Ericsson Interview Question

Write code to identify missing digit in n array: like : [1,2,3,4,5,7,8,9] - 6