In this meeting, the State Changers worked on debugging JavaScript code. The goal was to extract an ID from a URL and include it into an element on a webpage using JavaScript. They discussed the functionality of the code and troubleshooted the issue in several steps.
In the initial stages, they addressed problems with the closing script tags and syntax errors in the code block. Several insights were given on how to write and structure proper JavaScript code. Explaining in detail how it functions, from loading into URL search parameters object, setting up Xano client to mapping open curly braces with closed ones, providing clarity on handling protocols in syntax. They also shed light on how to simplify the code and debug the syntax using tool like async and await. This function was introduced to simplify promise syntax and let the user await for data to come back from the server before running the rest of the code lines. Next, they explained how identifiers in document.GetElementById were being defined and how they were pulling data. In the subsequent steps, they encountered a few more issues with the syntax which were fixed. Towards the end, they realized the API endpoint from Xano didn’t exist, leading to an error. On checking the Xano settings, they found out that the URL was not entered correctly for the required API endpoint. The meeting concluded with a plan to further debug the code now that the Xano connection issue had been resolved. In the course of the discussion, the tools and technologies mentioned included JavaScript, Xano, Notion, Webflow, and async/await syntax in JavaScript.
(Source: Office Hours 2/22 )
Join State Change Risk-Free