The first is simple to work out:
Google[
^] will give you that.
The other is also simple:
sb is a StringBuilder - it allows you to add text to it to build up your total string as you go (without the penalties associated with concatenating strings). You do that by using the Append method:
sb.Append("some string data);
In your case, the data being appended is a JavaScript function declaration.