why array is called the collection of similar datatypes?

Answer Posted / guest

Array is called the collection of similar datatypes because
we can not add an object of some other type where as the
array which is declared is of another type.
For e.g
We declare a Integer array then we can not add an object of
type string into that array.We have to add an object of type
string only.

Is This Answer Correct ?    7 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to open a window with no toolbar, but with the location object?

677


Why is javascript used for web pages?

624


What is noscript tag?

711


Do you have to declare variables in javascript?

665


What is event target in javascript?

660


What are the new ways to define a variable in Javascript?

772


Create a new javascript object with the keys of “fname” equal to your first name, “lname” equal to your last name, and “fcolors” equal to and array of 3 of your favorite colors. Assign this object to a variable called “me” and log it to the console.

808


How to make a array as a stack using javascript?

709


Where do you write javascript?

662


If an array with name as "names" contain three elements, then how will you print the third element of this array?

724


Can javascript code be broken in different lines?

716


Name the types of functions.

682


What is use of settimeout function in javascript?

719


Should I disable javascript?

683


What is difference between local variable and global?

680