You can use double quotes instead of single quotes:
theAnchorText = "I'm home";
Alternatively, escape the apostrophe:
There are also other characters you can put after a backslash to indicate other special characters. For example, you can use
\n for a new line, or
\t for a tab.