The domain of a function is the set of values of x in which the function can be calculated.
The range of a function is the associated values of the function respect to the domain.
You have the following function:
In order to determine the domain and range of the previous function, you consider that the given function is available for any value of x. Then, you have:
dom y: -∞ ≤ x ≤ ∞ : (-∞,∞)
The range of the function can be determine by noticing, on the graph, that the maximum value of the function is y=3 and also you can notice that there is no a limit for negatives values of the function. Then, you have:
ran y: -∞ ≤ y ≤ 3 : (-∞,3]