I am currently learning Full Stack development and working on a cryptocurrency project. The goal is to use AJAX to call crypto coin data from an API, search for specific cryptocurrencies, display the information on Bootstrap cards, and implement toggle switches with collapsible additional information from the API. However, I'm encountering an issue where the collapse functionality is not working as expected. I've tried various solutions and even spent two weeks searching on Google but haven't been able to figure out what's wrong with my code. Your help would be greatly appreciated!
Below is a snippet of my code:
let cryptos = []
const baseUrl = 'https://api.coingecko.com/api/v3/coins'
let singleCrypto = {}
// Functions for displaying all and searching for cryptocurrencies
When clicking on the "MORE INFO" button for "bitcoin," I should receive additional data from the moreInfo function. However, instead of getting the desired information, I'm seeing the following error in the console:
Uncaught ReferenceError: bitcoin is not defined
at HTMLButtonElement.onclick (home.html:1:15)
onclick @ home.html:1