JavaScript JavaScript Loops, Arrays and Objects Tracking Multiple Items with Arrays Create an Array

Kunal Shah
Kunal Shah
958 Points

I am getting an error saying it does not have 3 numbers var data = ["1","2","3"];

Any syntax errors?

script.js
var data = ["1","2","3"];
index.html
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>JavaScript Loops</title>
</head>
<body>
<script src="script.js"></script>
</body>
</html>

1 Answer

Michael Liendo
Michael Liendo
15,324 Points

hint: Currently, you don't have numbers in your array. You currently have something 3 of something else.

Kunal Shah
Kunal Shah
958 Points

Thanks, I figured it out :)