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 77 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
Thanks for the timely response, appreciate it


TheNamesImani

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

 

Did you know?

Symptoms of kidney problems include a loss of appetite, back pain (which may be sudden and intense), chills, abdominal pain, fluid retention, nausea, the urge to urinate, vomiting, and fever.

Did you know?

In the ancient and medieval periods, dysentery killed about ? of all babies before they reach 12 months of age. The disease was transferred through contaminated drinking water, because there was no way to adequately dispose of sewage, which contaminated the water.

Did you know?

Recent studies have shown that the number of medication errors increases in relation to the number of orders that are verified per pharmacist, per work shift.

Did you know?

Acetaminophen (Tylenol) in overdose can seriously damage the liver. It should never be taken by people who use alcohol heavily; it can result in severe liver damage and even a condition requiring a liver transplant.

Did you know?

Everyone has one nostril that is larger than the other.

For a complete list of videos, visit our video library