+ 2

Hi does anyone know the tips for learning JavaScript?

i was got a problem in arrays hm.. this make me tired

1st Jun 2017, 4:09 AM
Ilham Alif Saputra
Ilham Alif Saputra - avatar
4 odpowiedzi
+ 6
@_Retr0/- What you did there was creating a string not an array. You overwrote x with "a" then with "b" and then with "c". So, 'var x = ("a","b","c")' results in a string with the value "c". I think you got confused with python. In javascript you create an Array with brackets: var x = ["a","b","c"];
1st Jun 2017, 6:30 AM
Tim G
Tim G - avatar
+ 1
arrays r created Like this - var x = ("a","b","c") so think x as a book and a,b,c as chapters of the book
1st Jun 2017, 5:53 AM
_Retr0/-
_Retr0/- - avatar
0
ok thanks :D
1st Jun 2017, 6:31 AM
Ilham Alif Saputra
Ilham Alif Saputra - avatar
0
oops I forgot
1st Jun 2017, 7:32 AM
_Retr0/-
_Retr0/- - avatar