---
title: "Discussion on \"How to Get the First Line of a Multiline String in JavaScript\" | Hashnode"
description: "Discussion on \"How to Get the First Line of a Multiline String in JavaScript\". In JavaScript, getting the first element of an array or string is pretty easy. But when it comes to getting the first line of a multiline string, some approaches can hurt your app's performance in certain cases.\nIn this article, we will look at the t..."
url: "https://hashnode.com/posts/how-to-get-the-first-line-of-a-multiline-string-in-javascript/66ba122d63860a72fccae75e"
---

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

Discussion

# [How to Get the First Line of a Multiline String in JavaScript](https://freecodecamp.org/news/how-to-get-the-first-line-of-a-multiline-string-in-javascript?utm_source=hashnode&utm_medium=feed)

In JavaScript, getting the first element of an array or string is pretty easy. But when it comes to getting the first line of a multiline string, some approaches can hurt your app's performance in certain cases. In this article, we will look at the t...

Jan 24, 2024 · 3 min read · freecodecamp.org  
Read the article

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

## Written by

[Furkan Emin Can](https://hashnode.com/@femincan)

@femincan · Turkiye

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

A front-end developer who loves reading, writing, and calisthenics.

Hello, I'm Furkan Emin Can. I'm a self-taught, passionate front-end developer who enjoys writing TypeScript and strives to become a better developer. In my free time, I love practicing calisthenics and enjoy reading programming blogs that help me improve my skills.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
