When you input values into a variable, there are a few best practices to follow.
s.prop2='test' (single quotes)
s.prop2="test" (double quotes)
s.pageName='John's Home Page'
s.pageName='John\'s Home Page'
s.pageName="John's Home Page"
In the first example, you can escape the apostrophe by inserting a backslash (\) immediately before it. This tells JavaScript that the apostrophe is not ending the string, but rather is part of it. The string then ends as intended, at the closing single-quote. The second example uses double-quotes around the entire string. In this case, a single-quote cannot indicate the end of the string. The same is true if a double-quote is part of the string. A value of s.pageName="Team Says "We Win!"" would be incorrect because of the use of double-quotes within the string, as well as surrounding it. This would be correct if entered as s.pageName="Team Says \"We Win!\"".