I have little vanila-js project. Chrome's console gives me error from title. Structure of my code is like this:
<script type="module">
    import * as THREE from 'https://unpkg.com/three/build/three.module.js';
    import { TrackballControls } from 'https://unpkg.com/three/examples/jsm/controls/TrackballControls.js';
    var camera, scene, renderer, controls;
    init();
    animate();
function init() {
//code here
var list_of_objects=generate_first();}
 class Color{
        constructor() {
            this.R=getRandomInt(0,255);
            this.G=getRandomInt(0,255);
            this.B=getRandomInt(0,255);
            this.hex=this.fullColorHex(this.R,this.G,this.B);
        }
//rest of code}
 function generate_first() {
        var list_of_gens=[];
        var color=new Color();}
</script>
Console indicates on line : var color=new Color();How to fix it? I have no idea why i have this problem.
PS:Yes, I've searched other topics on stack, but those topics touched frameworks or typescript. None helped me with my bug! That's why I created that topic. Please, don't leave minuses or thumbs down but help me.
 
    