O'Reilly Forums: Question Example 18-2 - O'Reilly Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Question Example 18-2

#1 User is offline   reinski 

  • New Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 21-July 12

Posted 21 July 2012 - 02:05 PM

Question Example 18-2

First of all: the program works fine. But I don’t understand the statement

request = new ajaxRequest()

because in the function ajaxRequest() an object is already generated with the operator “new”. So we have two new?

I then changed the statement to

request = ajaxRequest()

and the program still works fine. Well, I would expect that and I don’t understand that the program worked with two “new” operators. Can somebody explain this behavior to me?

Thank you.

PS Sorry for my English: I’m not a native speaker.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users