Build an fCC Forum Leaderboard - Build an fCC Forum Leaderboard

Tell us what’s happening:

i’m almost done with this project but am stuck here, 35. The fourth td element of each table row from the string returned by showLatestPosts should contain the number of views of the post.

please any solution with how i can sought it?

Your code so far

<!-- file: index.html -->

/* file: styles.css */

/* file: script.js */

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36

Challenge Information:

Build an fCC Forum Leaderboard - Build an fCC Forum Leaderboard

Hey there,

Please update the message to include your code. The code was too long to be automatically inserted by the help button.

When you enter a code, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

const showLatestPosts = data => {

const { users, topic_list } = data;

const { topics } = topic_list;

postContainer.innerHTML =

topics.map(item => {

  const { id, title, views, posts_count, slug, posters, category_id, bumped_at } = item;

  return \`<tr>

        <td>

          <a class='post-title' href='${forumTopicUrl}${slug}/${id}'>${title}</a>

          ${forumCategory(category_id)}

        </td>

        <td>

          <div class='avatar-container'>

            ${avatars(posters, users)}

          </div>

        </td>

        <td>

          ${posts_count - 1}

        </td>

        <td>

          ${viewCount(views)}

        </td>

        <td>

          ${timeAgo(bumped_at)}

        </td>

      </tr>\`

}).join('');

}

it’s not going through this part, where it says…….The fourth td element of each table row from the string returned by showLatestPosts should contain the number of views of the post.

can you please follow the formatting guide and put your code in a code block?