About 18,900,000 results
Open links in new tab
  1. How do I declare an array in Python? - Stack Overflow

    Aug 23, 2022 · The array structure has stricter rules than a list or np.array, and this can reduce errors and make debugging easier, especially when working with numerical data.

  2. How do I declare and initialize an array in Java? - Stack Overflow

    Jul 29, 2009 · This answer fails to properly address the question: "How do I declare and initialize an array in Java?" Other answers here show that it is simple to initialize float and int arrays …

  3. Array increment positioning with respect to indexer in C - array [i ...

    Apr 26, 2023 · An illustration. Suppose that array contains three integers, 0, 1, 2, and that i is equal to 1. array[i]++ changes array[1] to 2, evaluates to 1 and leaves i equal to 1. array[i++] …

  4. 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 …

  5. Which comes first in a 2D array, rows or columns?

    Jul 25, 2012 · When creating a 2D array, how does one remember whether rows or columns are specified first?

  6. What does [:-1] mean/do in python? - Stack Overflow

    Mar 20, 2013 · Working on a python assignment and was curious as to what [:-1] means in the context of the following code: instructions = f.readline()[:-1] Have searched on here on S.O. …

  7. Check if an element is present in an array [duplicate]

    As of JULY 2018, this has been implemented in almost all major browsers, if you need to support an older browser a polyfill is available. Edit: Note that this returns false if the item in the array …

  8. Loop through an array in JavaScript - Stack Overflow

    Jun 10, 2010 · In the case of an array, the callback is passed an array index and a corresponding array value each time. (The value can also be accessed through the this keyword, but …

  9. What does `array[^1]` mean in C# compiler? - Stack Overflow

    Oct 26, 2020 · What does `array [^1]` mean in C# compiler? [duplicate] Asked 4 years, 7 months ago Modified 1 year, 6 months ago Viewed 48k times

  10. How can I create a two dimensional array in JavaScript?

    Assuming a somewhat pedantic definition, it is technically impossible to create a 2d array in javascript. But you can create an array of arrays, which is tantamount to the same.