Okay this code is getting dense 😅
-T W I T T E R-

seen from United States
seen from Belgium
seen from Belgium
seen from Singapore
seen from Germany
seen from United States

seen from United States

seen from United States
seen from Malaysia
seen from United States

seen from Japan

seen from Japan

seen from Japan
seen from United States

seen from Netherlands

seen from Peru

seen from Peru

seen from United States
seen from Canada
seen from Türkiye
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!