Skip to content

Conversation

@fartinmartin
Copy link
Contributor

The current definition of the String.concat says it will:

converts the one or more given values to strings...

But, the type suggests a it only accepts a single string value:

/**
* If necessary, converts the one or more given values to strings.
* Those values are concatenated with the original string, the result is returned. The original string is not effected.Returns the concatenated string.
* @param value The values to be concatenated with the given string.
*/
concat(value: string): string

This PR updates the parameters to ...values: any[].

// test-in-ae.jsx
alert(
  "".concat(
    { key: "value", prop: ["test"] },
    ["array", 1, { two: "three" }],
    "string",
    function test() {
      return true;
    },
    false,
    100
  ),
);

@fartinmartin fartinmartin changed the title Concat [JavaScript] String.concat accepts array of any values May 14, 2025
@fartinmartin fartinmartin changed the title [JavaScript] String.concat accepts array of any values [JavaScript] String.concat accepts any number of any values May 16, 2025
@zlovatt zlovatt merged commit 108a68f into docsforadobe:master May 17, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants