Okay this code is getting dense 😅
-T W I T T E R-
seen from Bosnia & Herzegovina
seen from United States

seen from United States

seen from Australia

seen from United Kingdom

seen from United States
seen from Tunisia
seen from China

seen from T1

seen from United States

seen from United Kingdom
seen from China
seen from Malaysia

seen from United Kingdom
seen from Netherlands
seen from China

seen from United States
seen from Saudi Arabia
seen from United States

seen from United Kingdom
Okay this code is getting dense 😅
-T W I T T E R-
Looping JavaScript Arrays
So I have a small question: What’s wrong with my code? I’m trying to obviously just loop through and print the contents of this array and I’m new to JavaScript but nothing really looks wrong to me? I pasted the errors I’ve received below.
var locations = [ "One", "Two", "Three"
];
function createArray() {
for (var i = 0; i < locations.length(); i++) { alert(locations[i] + "\n";); } }
12: Expected ']' at column 5, not column 1.];
20: Missing 'use strict' statement.for (var i = 0; i < locations.length(); i++)
20: Move 'var' declarations to the top of the function.for (var i = 0; i < locations.length(); i++)
20: Stopping. (83% scanned).for (var i = 0; i < locations.length(); i++)
Thanks for any assistance!