This topic contains a solution. Click here to go to the answer

Author Question: What will the browser display if the following script is executed? < SCRIPT LANGUAGE = ... (Read 62 times)

segrsyd

  • Hero Member
  • *****
  • Posts: 530
What will the browser display if the following script is executed?
 
  < SCRIPT LANGUAGE = JavaScript >
  var theArray =  1, 2, 3, 4, 5, 6, 7, 8, 9 ;
  modifyArray( theArray 3  );
  document.write( theArray.join(   ) );
  function modifyArray( i )
  i = 11;
 
 
  a) Nothing, the browser will generate an error.
  b) 1 2 3 4 5 6 7 8 9
  c) 1 2 11 4 5 6 7 8 9
  d) 1 2 3 11 5 6 7 8 9

Question 2

What is the effect of the join statement in the following code? var theArray1 =  1, 2, 3, 4, 5, 6, 7, 8, 9, 10 , theArray2 =  1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ; var value = theArray1.join(   );
 
  a) The join method will concatenate the values of theArray2 to theArray1.
  b) The join method will concatenate the values of theArray1 to theArray2.
  c) The join method will create a string from the values in theArray1.
  d) The join method will create a string with the values of theArray2 concatenated to the values of theArray1.



Related Topics

Need homework help now?

Ask unlimited questions for free

Ask a Question
Marked as best answer by a Subject Expert

Anonymous

  • Sr. Member
  • ****
  • Posts: 317
Answer to Question 1

Ans: (b)

Answer to Question 2

Ans: (c)




segrsyd

  • Member
  • Posts: 530
Reply 2 on: Jul 7, 2018
Wow, this really help


at

  • Member
  • Posts: 359
Reply 3 on: Yesterday
Thanks for the timely response, appreciate it

 

Did you know?

Asthma attacks and symptoms usually get started by specific triggers (such as viruses, allergies, gases, and air particles). You should talk to your doctor about these triggers and find ways to avoid or get rid of them.

Did you know?

According to the Migraine Research Foundation, migraines are the third most prevalent illness in the world. Women are most affected (18%), followed by children of both sexes (10%), and men (6%).

Did you know?

Multiple experimental evidences have confirmed that at the molecular level, cancer is caused by lesions in cellular DNA.

Did you know?

Patients who have undergone chemotherapy for the treatment of cancer often complain of a lack of mental focus; memory loss; and a general diminution in abilities such as multitasking, attention span, and general mental agility.

Did you know?

Automated pill dispensing systems have alarms to alert patients when the correct dosing time has arrived. Most systems work with many varieties of medications, so patients who are taking a variety of drugs can still be in control of their dose regimen.

For a complete list of videos, visit our video library