Your friend might have said the IQR is 6 because the second quartile goes from 10 to 16 giving it a range of 6. However, this is incorrect because, as the name suggests, the IQR is the middle 50% of data. This means the IQR includes the range of Q2 as well as Q3.