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

Leave the data array in place. Add another line of code that creates a second array named assorted. Assign one string va

it says task 1 is no longer passing....don't know who where am going wrong

script.js
var data=[
  2,
  4,
  6,
  ];

var assorted = [2,4,6],
 assorted(', ');
console.log(assorted); //log the year variable to the console

console.log(assorted); //log the year variable to the console
index.html
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>JavaScript Loops</title>
</head>
<body>
<script src="script.js"></script>
</body>
</html>
Omar Ocampo
Omar Ocampo
3,152 Points

var data = [ 80, 125, 30 ]; var assorted = ['seven', 25, false ];

Hey buddy, I found this code acceptable, have a good time.

3 Answers

You appear to be overthinking the question a bit. You just need to create a new array named assorted that contains 3 items. One item must be a string, one must be a number, and the last must be a boolean value.

For example:

var assorted = ['String', 45, true]

All of your other statements are superfluous and are not needed to complete this code challenge.

Let me know if you run into any more problems.

We don't see the value of $movie["director"] within a <td> element. help

?php $movie["title"] = "The Empire Strikes Back"; $movie["year"] = 1980; $movie["director"] = "Irvin Kershner"; $movie["imdb_rating"] = 8.8; $movie["imdb_ranking"] = 11;

?>

<h1><?php echo $movie['title'], ' (', $movie['year'], ')' ; ?> </h1>

<table> <tr> <th>Director</th> <td> <?php echo $movie["director"] ?></td> </tr> <tr> <th>IMDB Rating</th> <td> <?php echo $movie["imdb_rating"] ?></td> </tr> <tr> <th>IMDB Ranking?></th> <td> <?php echo $movie["imdb_ranking"] ?></td> </tr>

</table>

<tr> <th>Director</th> <td>Robert Zemeckis</td> </tr>

Rhonda Laurence
Rhonda Laurence
Full Stack JavaScript Techdegree Student 13,664 Points

I still have something wrong though: var data = [ {5, 8, 10},

];

var assorted = [ {'good work', 12, true} ];