The range of a function is all the values of the y variable (of a function) that are related to the values of the x variable (in the domain).
In this case, we have that the values that represent the range of the function are in the second set of numbers (see the direction of the arrows).
Therefore, the range is represented by {2, 6, 8}.
In summary, the range of the function is {2, 6, 8} (option D).