Skip to content

Interactive example collapses whitespace in output #668

@dmcbrn

Description

@dmcbrn

MDN URL

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trim

What specific section or headline is this issue about?

Try it box

What information was incorrect, unhelpful, or incomplete?

console.log(" a a ")
>"a a"

What did you expect to see?

>a a

Do you have any supporting links, references, or citations?

Same link

The trim() method of String values removes whitespace from both ends of this string and returns a new string, without modifying the original string.

Do you have anything more you want to share?

No response

MDN metadata

Page report details

Metadata

Metadata

Assignees

No one assigned

    Labels

    p1We will address this soon and will provide capacity from our team for it in the next few releases.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions