For the way you have it posted: ["כלב", "חתול", "דג", "סוס"]
The [0] index is gonna be the last word "כלב"
!
You can check that out by copying & pasting this line below on any browser console: [“כלב”, “חתול”, “דג”, “סוס”][0]`
And if we use our keyboard’s right key to navigate the line above letter-by letter, we’ll notice the cursor will jump to the end of the line and then it will start to move to the left!
Another clue something isn’t as we’d expect, that line is using space + comma a ,a
rather the regular comma + space a, a
style.
So the whole thing is RTL, thus creating a reversed array!
The workaround I’ve found was having each Hebrew word on a separate line:
[
{ "animalsEnglish": [
"dog",
"cat",
"fish",
"horse"
] },
{ "animalsHebrew": [
"סוס",
"דג",
"חתול",
"כלב"
] }
];
This way, we make sure the Hebrew strings won’t be in reversed order due to RTL:
[
"סוס",
"דג",
"חתול",
"כלב"
][0]
Gonna log 'סוס'
this time!