VOOZH about

URL: https://www.geeksforgeeks.org/javascript/javascript-symbol-split-property/

⇱ JavaScript Symbol split Property - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

JavaScript Symbol split Property

Last Updated : 12 Jul, 2025

JavaScript Symbol split property is used to specify the method that splits a string at the indices that match a regular expression. This property is called by the String.split() method.

Syntax:

[Symbol.split](string)

Property attributes: It accepts a "String" which is not Writable, Enumerable, and Configurable.

Return value: It returns a string that is split from the given expression.

Below examples illustrate the Symbol split property in JavaScript:

Example 1: In this example, we will split the string and add ("") in it.

Output:

"'Geeks' 'for' 'Geeks'"
"'' 'Geeks' '1Geeks2Geeks3Geeks4'"

Example 2: In this example, we will split the string and add (_) in it.

Output:

_Geeks__for__Geeks_
_Computer__ __Science Portal_

Supported Browsers: The browsers supported by JavaScript Symbol split property are listed below:

  • Google Chrome 51
  • Firefox 50
  • Edge 15
  • Opera
  • Apple Safari

We have a complete list of Javascript symbols' properties and methods, to check those please go through the Javascript Symbol Complete Reference article.

Comment