Multiple choice technology testing

Which of following statement is true while instantiating a VBScript class.

  1. CreatePage = New Pages

  2. New CreatePage = Pages()

  3. Set CreatePage = New Pages

  4. Dim CreatePage = New Pages

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

VBScript requires the 'Set' keyword when assigning object references. The correct syntax is 'Set CreatePage = New Pages'. Options A and B use incorrect syntax without Set or with wrong keyword order, and Dim cannot be combined with New in the same statement.