JavaScript Symbol.for() MethodThe JavaScript Symbol.for() method is used to search for existing symbol in a runtime-wide symbol registry with the provided key and returns if it found. Otherwise, a new symbol gets created with this key. SyntaxParametersKey: The Keys to the symbol. Return valueExisting symbol with the given key if found otherwise, a new symbol is created and returned. Browser Support
Example 1Test it NowOutput: true Example 2Test it NowOutput: true Next TopicJavaScript Symbol |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India