---
title: "Discussion on \"The bug your test cannot see\" | Hashnode"
description: "Discussion on \"The bug your test cannot see\". Here is a function. It has one job: give me the three highest scores.\nfunction topThree(scores) {\n  scores.sort((a, b) => b - a)\n  return scores.slice(0, 3)\n}\n\nIt works. topThree([72, 98, 64, 91, 87,"
url: "https://hashnode.com/posts/the-bug-your-test-cannot-see/6a797c78766801a5af98279b"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [The bug your test cannot see](https://inferhaven.hashnode.dev/the-bug-your-test-cannot-see?utm_source=hashnode&utm_medium=feed)

Here is a function. It has one job: give me the three highest scores. function topThree(scores) { scores.sort((a, b) => b - a) return scores.slice(0, 3) } It works. topThree(\[72, 98, 64, 91, 87,

Aug 10 · 7 min read · inferhaven.hashnode.dev  
Read the article

-   [#codetrain](https://hashnode.com/tag/codetrain)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#lodash](https://hashnode.com/tag/lodash)
-   [#testing](https://hashnode.com/tag/testing)
-   [#side-effects](https://hashnode.com/tag/side-effects)

## Written by

[InferHaven](https://hashnode.com/@inferhaven)

@inferhaven

  
[View profile](https://hashnode.com/@inferhaven)

Bringing privacy & security to the AI dev environment by default.

Bringing privacy &amp; security to the AI dev environment by default.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
