@ChesouyeCoye Looks like the code is trying to use 4x code with the 3.43 API library. This will not work. See https://developers.arcgis.com/javascript/latest/ for more info about using the 4x API.
For questions specific to the ArcGIS Maps SDK for JavaScript, it might better to ask in that specific community -- https://community.esri.com/t5/arcgis-maps-sdk-for-javascript/ct-p/arcgis-api-for-javascript
@ChesouyeCoye in order for people in the community to help you better it would be good to frame your post as a question with the specific details you are hoping to achieve, and then include a link to the code running somewhere as a public web page or a CodePen or other type sandbox. Putting such a large amount of code that is unformatted here isn't going to be helpful for anyone who would like to help you figure this issue out.
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.