Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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>

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.

Daniel Powell thanks I actually tough we were converting a variable to a boolean another to a string and setting a variable to true. thanks

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>

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

];

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