Coding Global Background
Coding Global

JavaScript Dijkstra-Algorithm

Archived 2 years ago
2 messages
1 members
3 years ago
Open in Discord
D
Faustulus

Hi there. I'm trying to implement the dijkstra-alorithm in Javascript. But it doesn't work. After creating a graph the script should show me the shortest way from a start-node to another node. My code is in the text file below. And this is my output: ``` TypeError: Cannot read properties of undefined (reading 'forEach') ``` I followed this tutorial: https://medium.com/@adriennetjohnson/a-walkthrough-of-dijkstras-algorithm-in-javascript-e94b74192026 Thanks for any help.

Replies (2)