---
title: "Discussion on \"How to find an element in JavaScript and move it to the first position.\" | Hashnode"
description: "Discussion on \"How to find an element in JavaScript and move it to the first position.\". Surely there are several way to do it, this is just one of them. Let me know if you know a better way to do it 💪🏻\nTo find an element into an array and move to be the first, you have to:\n\nget the index of the founded item using findIndex()\n\n\n📚 The ..."
url: "https://hashnode.com/posts/how-to-find-an-element-in-javascript-and-move-it-to-the-first-position/601cf8e01054fa16dadd702c"
---

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

Discussion

# [How to find an element in JavaScript and move it to the first position.](https://giuliachiola.hashnode.dev/how-to-find-an-element-in-javascript-and-move-it-to-the-first-position?utm_source=hashnode&utm_medium=feed)

Surely there are several way to do it, this is just one of them. Let me know if you know a better way to do it 💪🏻 To find an element into an array and move to be the first, you have to: get the index of the founded item using findIndex() 📚 The ...

Feb 5, 2021 · 3 min read · giuliachiola.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)

## Written by

[Giulia Chiola](https://hashnode.com/@giuliachiola)

@giuliachiola · Val di Susa, Italia

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

Front-end Developer. 👾 Media engineer. ⚡ Facing life one bug at a time. 🔥 Easily bribed with chocolate. 🍫 she/her

Front-end Developer. 👾 Media engineer. ⚡ Facing life one bug at a time. 🔥 Easily bribed with chocolate. 🍫 she/her - #BLM

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
