answersLogoWhite

0

You would insert this command right after your array values have been specified.

document.write(name of array[Number on array this item is, starts at 0])

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

How do you print an array in JavaScript without using a loop?

var fruits = ["Banana", "Orange", "Apple", "Mango"]; var x=fruits.valueOf(); alert(x);


How can you find factorial of each element in array using pointer?

To find the factorial of each element in an array using pointers in C, you can create a function that takes a pointer to the array and its size as parameters. In the function, iterate through the array using pointer arithmetic, calculating the factorial for each element and storing the result back in the same array or a separate array. For calculating the factorial, you can use a simple loop or recursion. Finally, print or return the modified array with the factorials.


How do you find particular element in array?

by using index position we can find the particular element in array.


Is it possible to print matrix without using array?

Yes but why.


How do you represent binary tree using array?

The root of the tree is stored in array element [0]; for any node of the tree that is stored in array element [i], its left child is stored in array element [2*i], its right child at [2*i+2]


Why and is not using ' and ' in reading a string using scanf?

I guess you wanted to ask, why is it scanf ("%s", array)and not scanf ("%s", &array).Well, array is by definition a pointer to the first element: array = &array[0]


How do you display 15 numbers in an ascending order using an array?

Sort the array then traverse the array, printing the element values as you go.


How do you work out the biggest number in an array without using the max function in Python 3?

To find the biggest number in an array without using the max function, you can initialize a variable to hold the largest number, typically starting with the first element of the array. Then, iterate through the array using a loop, and for each element, compare it with the current largest number. If the current element is greater, update the largest number. Finally, after the loop, the variable will contain the largest number in the array. Here’s a simple example: arr = [3, 5, 2, 9, 1] largest = arr[0] for num in arr: if num > largest: largest = num print(largest) # Output: 9


Write an Algorithm to delete a last element from the array?

// Assuming you dynamically allocated this array using "new"... delete array[arraysize - 1]; arraysize--;


How do you print array variable without using array subscripts?

Well the most prolific answer to this query would be the use of pointers.Use a pointer and allocate it to the array of interest and start printing.


How can you access an array without using the suffix operator?

An array's name implicitly converts to a pointer to the first element of the array at the slightest provocation. Thus to access the first element of the array, the array name suffices. To access any other element in the array without using the suffix operator, use offset pointer arithmetic. For example: int a[] = {2, 4, 6, 8, 10}; int b; b = *(a+3); assert (b == 8); Here, (a+3) points to the 4th element (offset 3). Dereferencing this address returns the value of that element, in this case 8.


How do you draw pascals triangle in gwbasic?

I suggest using an array with as many elements as the longest row you need. To keep it simple, keep two copies of the array, and calculate each element of the "new" array as the sum of the corresponding element, plus the previous element, of the "old" array. Then copy the information back for the next step.