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 76 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
:D TYSM


yeungji

  • Member
  • Posts: 319
Reply 3 on: Yesterday
Wow, this really help

 

Did you know?

Certain chemicals, after ingestion, can be converted by the body into cyanide. Most of these chemicals have been removed from the market, but some old nail polish remover, solvents, and plastics manufacturing solutions can contain these substances.

Did you know?

Signs and symptoms of a drug overdose include losing consciousness, fever or sweating, breathing problems, abnormal pulse, and changes in skin color.

Did you know?

More than nineteen million Americans carry the factor V gene that causes blood clots, pulmonary embolism, and heart disease.

Did you know?

Hypertension is a silent killer because it is deadly and has no significant early symptoms. The danger from hypertension is the extra load on the heart, which can lead to hypertensive heart disease and kidney damage. This occurs without any major symptoms until the high blood pressure becomes extreme. Regular blood pressure checks are an important method of catching hypertension before it can kill you.

Did you know?

As of mid-2016, 18.2 million people were receiving advanced retroviral therapy (ART) worldwide. This represents between 43–50% of the 34–39.8 million people living with HIV.

For a complete list of videos, visit our video library