Observe the following JavaScript array declaration and answer the question:…

NVS Computer Science / IT Teacher Recruitment · Computer Science · 2017

Observe the following JavaScript array declaration and answer the question: Statement 1 ItemName = new Array ( "Chromebook" , "IPad" , "Mobile" ); Statement 2 ItemName = [ "Chromebook" , "IPad" , "Mobile" ]; ---------------------------------------- ​

  1. A.

    Both statements have exactly the same effect.

  2. B.

    Both statements are different as they declare different types of variables.

  3. C.

    Both statements are different as one is only declaring while other is declaring and initializing.

  4. D.

    Both statements are different as they declare arrays of different sizes.

Attempted by 722 students.

Sign up free to check your answer

Sign up free

Explore the full course: Rssb Senior Computer Instructor

Loading lesson…