Yansanmo: object ,.

Khounthavong: So you will need to do:

Quiles: E.g. reducefunctionsum, currentItem{return sum + extractValuecurrentItem}, originalSum

Gola: If you don’t add that last argument, the first value for sum is the first value, which is not what was intended in many cases

Hudas: First value in the array*

Floto: Soteros, you have to supply the 0 at the end?

Wammack: Soteros, ok, makes sense

Dolhon: How can I push entire array into an object?

Hitchko: The array is an object too

Bidle: Everything’s an object

Dolhon: So how can I put inside of {}

Bidle: Really though, obj = {array: yourArray} is that what you want?

Hallihan: I think he wants to put all array values into an array-like object

Dolhon: I’m looking for a ‘push’ method

Dolhon: I want to put multiple arrays into an object

Bidle: Why don’t you put multiple arrays into another array

Bidle: Which makes a lot more sense that what you’re asking

Sampley: Maybe if you put an example of needed input and desired output

Dolhon: I want to do something like this

Dolhon: Http://shrt.edu.pl/beta/teeth/beta3/

Dolhon: In here there is static number of elements

Dolhon: Var objectA = {“prochnica”:, “wypelnienie”:, “korona”:, “amalgamat”:, “u_przyszyjkowy”:, “brak_zeba”:};

Gariety: Well that makes sense

Dolhon: And now I want to have dynamic number of arrays inside

Muralles: Well, there’s no reason why “prochnica” array couldn’t be smaller or bigger than “korona” array

Kollmorgen: You can keep up pushing elemnents into any of the array you want

Dolhon: But there is a reason to automatically create arrays with names of elements from the list

Konopacki: Dolhon: The XY problem: You want to do X, but don’t know how. You think you can solve it using Y, but don’t know how to do that either. You ask about Y, which is a strange thing to want to do. Just ask about X.

Folkers: Dolhon: you should probably try describing the problem you’re trying to solve. Just like you’d describe it to someone that knows nothing about programming at all

Starnauld: ObjectA’someName’ = ;

Phipps: ObjectA’someName’.push’a’, ‘b’, ‘c’

Antilla: Var objectA = {}; objectA’someName’ = ; objectA’someName’.push’a’, ‘b’, ‘c’; objectA;

Konopacki: Yansanmo: object {someName: ‘a’, ‘b’, ‘c’}

Dolhon: Http://shrt.edu.pl/beta/dorian/ — I want to create array with arrays inside of it. currently there are 3 id’s here 1-3 so there would be 3 sub-arrays. in each array I would like to put every change user has done in a single row. for example it would be objectA = {“array1″:,”array2″:,”array3”:}

Dolhon: The problem is that I want to have dynamic number of sub-arrays

Dolhon: Depending on the number of id’s

Dolhon: It is, if I want to ***ign the data to the correct array

Cornfield: Dolhon: that’s how you think you can solve it, not the problem. And that’s definitely not how you’d go about explaining what you’re trying to do to someone who doesn’t know programming

Brun: If your input is 3 and you want {“array1″:,”array2″:,”array3”:} it’s very easy with a loop

Larabell: What’s the point of having the object like that?

Lavene: Var n = 3; var objectA = {}; forvar i = 1; i = n; i++ { objectA”array”+i = ; }; objectA;

Konopacki: Yansanmo: object {array1: , array2: , array3: }

Dolhon: Gunnerson: okay. let it be an array then 😀

Pepper: I mean, order clearly looks like an important factor

Reckers: And objects are unordered

Leonick: Var n = 3; var arrayA = ; forvar i = 1; i = n; i++ { arrayA.push; }; arrayA;

Konopacki: Yansanmo: object , ,