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 63 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


apple

  • Member
  • Posts: 352
Reply 3 on: Yesterday
YES! Correct, THANKS for helping me on my review

 

Did you know?

Giardia is one of the most common intestinal parasites worldwide, and infects up to 20% of the world population, mostly in poorer countries with inadequate sanitation. Infections are most common in children, though chronic Giardia is more common in adults.

Did you know?

Acute bronchitis is an inflammation of the breathing tubes (bronchi), which causes increased mucus production and other changes. It is usually caused by bacteria or viruses, can be serious in people who have pulmonary or cardiac diseases, and can lead to pneumonia.

Did you know?

The term bacteria was devised in the 19th century by German biologist Ferdinand Cohn. He based it on the Greek word "bakterion" meaning a small rod or staff. Cohn is considered to be the father of modern bacteriology.

Did you know?

Essential fatty acids have been shown to be effective against ulcers, asthma, dental cavities, and skin disorders such as acne.

Did you know?

Vampire bats have a natural anticoagulant in their saliva that permits continuous bleeding after they painlessly open a wound with their incisors. This capillary blood does not cause any significant blood loss to their victims.

For a complete list of videos, visit our video library