LEARN HANDLEBARS Combining "If" and "Each"


#1

im sorry but i couldn’t find any better tag.

const source = document.getElementById('languagesTemp').innerHTML;
const template = Handlebars.compile(source);

const context = {
  languages: [
    {
      name: 'HTML',
      modern: true
      
    },
    {
      name:'CSS',
      modern: true
    }, 
    {
      name: 'JavaScript',
      modern: true,
    }
  ]
};

const compiledHtml = template(context);

const displayGoals = document.getElementById('goals');
displayGoals.innerHTML = compiledHtml;

Error: Did you add a modern property to all of the objects in the array value of languages ?

url:https://www.codecademy.com/paths/web-development/tracks/webdev-building-website-templates/modules/templating-with-handlebars/lessons/learn-handlebars/exercises/handlebars-if-each


#2

could you share the url (in the address bar) here in this topic? So we can access the lesson


#3

This exercise is bugged. I have done it just a couple of hours ago, and the only way to finish it is by getting the solution. Even the answer of the solution is deemed wrong by the exercise, so there is certainly a bug in there!


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.