Question: I have class Movie. Movie constructor should provide a generation of unique product id within the application no matter how many products are created. You also need to define a field with the name of the movie. But according to the condition, for this I have to use Symbol data type. How can i do this?

```js
class Movie {
  constructor(name) {
    //here I need to generate a unique id; 
    //here I need to define name fields
  }
}
```

Answer: 
```
class Movie {
  sym = Symbol('symbol description')

  constructor(name) {
    this.symInConstructor = Symbol('symbol description')
    // this.sym != this.symInConstructor
    // M1.sym == M2.sym  <=>  M1 == M2
  }
}
// remeber, Symbol() != Symbol(), each call creates a unique one

```

However note that you can't ever serialize a Symbol.  

If you need a serializable thingy, generate uuid or whatever

Also it may have sense to not use Symbol, but to use the class instance itself, I don't see how the Symbol may be used
Create a global constant, and use square brackets access

```
const MovieName = Symbol('a key for MovieName') 

class Movie {

    [MovieName] = "The Movie";

    ["myString"] = "is equivalent to:"
    // myString = "is equivalent to:"
    // and must be used for Symbols as

    constructor() {
        this[MovieName] = "The Movie in constructor"
    }

    // may keep is somewhere like this for usage in other places
    static movieNameSymbol = MovieName
}

```