Skip to content
This repository was archived by the owner on Sep 25, 2019. It is now read-only.

Template literal challenge passes with incorrect code #274

@joshalling

Description

@joshalling

Describe the bug

The challenge passes if you hardcode three array values into your function.

To Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. use the following code
const resultDisplayArray = [
    `<li class="text-warning">${arr[0]}</li>`,
    `<li class="text-warning">${arr[1]}</li>`,
    `<li class="text-warning">${arr[2]}</li>`
  ];
  1. The tests pass when they shouldn't

Expected behavior

This is problematic because the given function will not work with arrays that have more or less than 3 values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions