title: how fix this error:Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'length')
body: <p>I am creating a website loading gltf 3d models.I want to load more models using loop.</p>
  <pre class="lang-js prettyprint-override"><code>const loader = new GLTFLoader()
  //.setPath( 'models/gltf/DamagedHelmet/glTF/' );
        .setPath( 'resources/' );
  const resourceData = [&quot;Learning Bee1&quot;,&quot;Learning Bee2&quot;,&quot;Learning Bee3&quot;];
  //const l = resourceData.length;
  
  for(let i=0; i&lt;resourceData.length;i++){
      let oResource = resourceData[i];
      let sModelName = oResource + &quot;.gltf&quot;;
      loader.load( sModelName, function ( gltf ) {
  
          gltf.scene.traverse( function ( child ) {
  
              if ( child.isMesh ) {
  
                  roughnessMipmapper.generateMipmaps( child.material );
  
              }
  
          });
      });
  
      scene.add( gltf.scene );
  
      roughnessMipmapper.dispose();
  
      render();
  
  }
  
  });
  </code></pre>
  <p>When I run this,shown below error.how fix this?</p>
  <p>three.module.js:38723 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'length')
  at three.module.js:38723</p>