About 14,500,000 results
Open links in new tab
  1. How to create an array containing 1...N - Stack Overflow

    Why go through the trouble of Array.apply(null, {length: N}) instead of just Array(N)? After all, both expressions would result an an N -element array of undefined elements. The difference is that …

  2. How do I create an array in Unix shell scripting? - Stack Overflow

    Dec 10, 2009 · To clarify the above comment, the issue with the question is that there is no such thing as "Unix shell [scripting]". Instead, there are multiple shells, with a POSIX-compatible …

  3. javascript - Array.size () vs Array.length - Stack Overflow

    May 25, 2017 · The OP was asking 'Array.size () vs Array.length'. From the previous discussions, it was make clear, that the 'size' Function is not part of standard JavaScript but implemented …

  4. syntax - C++ array initialization - Stack Overflow

    Dec 17, 2009 · This will default-initialize an array of any type (assuming the elements allow default initialization), which means that for basic (scalar) types the entire array will be properly …

  5. javascript - Copy array items into another array - Stack Overflow

    I have a JavaScript array dataArray which I want to push into a new array newArray. Except I don't want newArray[0] to be dataArray. I want to push in all the items into the new array: var …

  6. How to loop through array in jQuery? - Stack Overflow

    Oct 15, 2010 · Specifically, for..in loops through the enumerable property names of an object (not the indexes of an array). Since arrays are objects, and their only enumerable properties by …

  7. Check if an array contains any element of another array in JavaScript

    May 1, 2013 · Use a for loop and iterate over the target array. If every element is contained within the current array (use current.indexOf(elem) !== -1), then they're all in there.

  8. Remove duplicate values from a JavaScript array - Stack Overflow

    If you want to remove objects from an array that have exactly the same properties and values as other objects in the array, you would need to write a custom equality checking function to …

  9. c++ - Default initialization of std::array? - Stack Overflow

    You can request value initialization quite easily in C++11 by giving each declaration an empty initializer: int plain_int{}; int c_style_array[13]{}; std::array<int, 13> cxx_style_array{}; Which will …

  10. Arrays vs Vectors: Introductory Similarities and Differences

    Feb 26, 2013 · What are the differences between an array and a vector in C++? An example of the differences might be included libraries, symbolism, abilities, etc. Array Arrays contain a …