In your code there are currently four braces (curly brackets).  Two belong to the function and two to the if statement.  Look for them and make sure you understand which ones are which (the indenting helps).

Now find the closing brace for the if statement and after it on that same line add this:

else {
    window.document.body.style.backgroundColor='yellow';
}

In plain English you now have an if/else statement which says:

if the page background is yellow

    change it to red

otherwise

    change it to yellow

Save and refresh and try it.  The yellow page should go red when you click the paragraph.  Click again and it goes yellow.