Symbols tutorial in Advance JavaScript
<! DOCTYPE html > < html lang = "en" > < head > < meta charset = "UTF-8" > < meta name = "viewport" content = "width=device-width, initial-scale=1.0, shrink-to-fit=no" > < meta http-equiv = "X-UA-Compatible" content = "ie=edge" > < title > Symbols Advance JavaScript </ title > < link rel = "stylesheet" href = "" > </ head > < body > < script > //Here Symbol means "A Unique Value" let id1 = Symbol ( "Hello World" ); let id2 = Symbol ( "Hello World" ); console . log ( id1 ); console . log ( typeof id1 ); console . log ( id1 == id2 ); //Here both "id1" and "id2" are Unique Value(Because of Symbol) let str1 ...
.png)
.png)
.png)
.png)
.png)
.png)
.png)
Comments
Post a Comment