View Single Post
  #1 (permalink)  
Old October 31st, 2010, 07:35 AM
JGFMK JGFMK is offline
Registered User
 
Join Date: Oct 2010
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Ch10 P308 looks wrong..

Why is script.text set to quoted code?
Surely the double quotes are incorrect in the catch block.

You have
var code = "function sayHi() {alert('hi');}";

Then later script.text = "code";

surely
script.text = code is the solution.