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?

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

1 Answer

Michael Liendo
Michael Liendo
15,325 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 :)