Skip to content

Tag: javascript

await does not affect async function

Hi i’m fairly new to javascript and I’m having a problem with my async function inside the AddEventListener method that is not awaiting the fetch result, so when i try to console.log(track_info.tracks) it prints out undefined. Answer Solution You need to add an await to the call of getTrack. var t…

Increment over time all elements of a class

In my homepage, I’m trying to have a bunch of numbers go from 0 to their default value. Those numbers are all inside spans with a specific class. And, I have some jquery to animate them. But it only works for the last number in the list… all the previous ones stay at their default value. Any idea …