Skip to content

Tag: javascript

Svelte store function update

Svelte store documentation shows String or Integer being updated, but I did not find any dynamic function in store. I don’t understand how to make the getData function as a writable in order to notify the html of the change. In the following sample, I would like b to be shown after the updateKey functio…

Count list items in data before outputting to HTML

I have a list that is being returned using ajax that looks like this… I am inserting it into a HTML element like this… This is working correctly, but I would like to count the number of list items before I output it to the element. I have tried the following but it just gives me the count of chara…

Differentiate 2 routes of a controller (NestJS)

EDIT: When I move the @Get(‘/random’) above the 2 other routes, it’s working… Weird I’m doing a NestJS server that just get some routes of the Breaking Bad API and displays the JSON in the routes of the server, I want to create 3 routes : 1 that returns a JSON of all characters o…