+ 1

Are there any function on js that can take two characters from tow different var and put it together on one element of array

for example var x="a"; var y="b"; /*and i have array i wont to make the first location of it "ab"*/

6th Aug 2018, 4:19 PM
Omar Muhammad Nofal
Omar Muhammad Nofal - avatar
4 Réponses
+ 1
var arr =[ ] var x="a" var y="b" arr.push(x+y)
6th Aug 2018, 4:41 PM
Dlite
Dlite - avatar
+ 1
please I don't understand what you mean
6th Aug 2018, 5:31 PM
Dlite
Dlite - avatar
0
but where i can define the location on array that i wont stor "ab"in it
6th Aug 2018, 5:19 PM
Omar Muhammad Nofal
Omar Muhammad Nofal - avatar
0
i wont the arr[5]="ab" for exampl
6th Aug 2018, 6:36 PM
Omar Muhammad Nofal
Omar Muhammad Nofal - avatar