+ 1

can someone explane me arr??? pls

4th Sep 2017, 3:52 PM
Phaxz
Phaxz - avatar
5 Answers
+ 4
@Bagshot: the question is tagged with 'javascript' not 'java' ^^ @Ivica: You're probably refering to a code example using a variable named 'arr' to store an array (list of values)... In JS, you can declare array by two main ways: var arr = new Array(); // explicit creation of Array object ... or: var arr = [ ]; // literal notation, implicit Array object created
4th Sep 2017, 4:06 PM
visph
visph - avatar
+ 2
Do you mean "arrr, I hit my toe!"? Or arr as in array? An array is just a collection of strings, intergers, floats, etc. You can access each element of the array using its index number. int[] arr = { 5, 4, 3, 2, 1}; string[] arr = {"sololearn", "is", "cool"}; It doesn't have to be called arr, by the way.
4th Sep 2017, 4:00 PM
Bagshot
Bagshot - avatar
+ 2
Ok, my mistake. It's actually c#, but yeah should have read it better.
4th Sep 2017, 4:13 PM
Bagshot
Bagshot - avatar
+ 1
Tnx
4th Sep 2017, 4:03 PM
Phaxz
Phaxz - avatar
+ 1
Tnx
4th Sep 2017, 4:06 PM
Phaxz
Phaxz - avatar