Top "Arrays" questions

An array is an ordered linear data structure consisting of a collection of elements (values, variables, or references), each identified by one or more indexes.

How to convert byte array to string

I created a byte array with two strings. How do I convert a byte array to string? var binWriter = new …

c# arrays binaryreader
How to remove item from array by value?

Is there a method to remove an item from a JavaScript array? Given an array: var ary = ['three', 'seven', 'eleven']; …

javascript arrays
Short circuit Array.forEach like calling break

[1,2,3].forEach(function(el) { if(el === 1) break; }); How can I do this using the new forEach method in JavaScript? I've tried …

javascript arrays foreach
Convert array to JSON

I have an Array var cars = [2,3,..] which holds a few integers. I've added a few values to the array, but …

javascript jquery json arrays
How to convert UTF-8 byte[] to string?

I have a byte[] array that is loaded from a file that I happen to known contains UTF-8. In some …

c# .net arrays string type-conversion
How can I concatenate two arrays in Java?

I need to concatenate two String arrays in Java. void f(String[] first, String[] second) { String[] both = ??? } What is the …

java arrays concatenation add
Copy array items into another array

I have a JavaScript array dataArray which I want to push into a new array newArray. Except I don't want …

javascript arrays
Check if an element is present in an array

The function I am using now to check this is the following: function inArray(needle,haystack) { var count=haystack.length; …

javascript arrays
How to add an object to an array

How can I add an object to an array (in javascript or jquery)? For example, what is the problem with …

javascript arrays object
Remove empty elements from an array in Javascript

How do I remove empty elements from an array in JavaScript? Is there a straightforward way, or do I need …

javascript arrays