The formula of a slope:
[tex]m=\dfrac{y_2-y_1}{x_2-x_1}[/tex]
We have the points (0, 0) and (-2, 4). Subtitute:
[tex]m=\dfrac{4-0}{-2-0}=\dfrac{4}{-2}=-2[/tex]