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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Vera Gominho](https://secure.gravatar.com/avatar/4d100a4c9b0a74674162adb2d5a83c23?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Vera Gominho
3,277 PointsThe list on employees doesn't show on the webpage
Hi, everyone.
For some reason, the list that should appear on the webpage, with the respective labels doesn't appear =(
Can you tell me what's wrong with my code? I even tried to copy-paste the code that worked for other people her in the questions, an i still have the same problem .
Here is my code: https://w.trhou.se/61wazogqxa
Thanks!
4 Answers
![KRIS NIKOLAISEN](https://secure.gravatar.com/avatar/65d74a723997b41a80d2d909c6e06960?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
KRIS NIKOLAISEN
54,969 PointsYou have two things going on
(1) There is no reference to widget.js in your index.html file. The following is included in the head of the video's workspace html
<script src="js/widget.js"></script>
Without it none of the javascript executes.
(2) The initialization in your for loop in widget.js has a syntax error. Instead of:
for(var = i; i<employees.length; i+=1){
it should be
for(var i = 0; i<employees.length; i+=1){
![Anis Shili](https://uploads.teamtreehouse.com/production/profile-photos/10699802/micro_Anis_Shili_Photo_0918.jpg)
Anis Shili
12,787 Pointsproblem in the for loop. exactly in the declaration of the i variable
![Vera Gominho](https://secure.gravatar.com/avatar/4d100a4c9b0a74674162adb2d5a83c23?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Vera Gominho
3,277 PointsThank you so much! Such a silly mistake! its working now :)
![Ross King](https://secure.gravatar.com/avatar/0e97406672424a4474af8d14f5dc7217?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Ross King
20,704 PointsHi Vera Gominho ,
Pretty close with your code so don't worry.
Issue
There were two updates I needed to make to get your code working.
- The widget.js wasn't included in your index.html via a script tag.
- An error in the widget.js employees for loop.
Fix
Including Script in Index.html
Near the bottom of your index.html file ensure you include a script link to your JavaScript file.
</div>
<script src="js/widget.js"></script>
</body>
</html>
For Loop
Your for loop was for(var = i; i<employees.length; i+=1). It should look like this:
for(var i = 0; i<employees.length; i+=1){
It was probably just a typo but when using for loops you need to assign a number as a starting index.