Skip to content

Tag: javascript

about button.addEventListener

If there are about 10 buttons and the buttons are numbered from 1 to 10, if button 1 is clicked, object 1 is created. If button 2 is clicked, object 2 is created and the remaining objects 1, 3 and 4 are deleted. I want to become In the present case, it is implemented by hard coding, but I want

MongoDB Problems while inserting nested data

I try to build a database for a giveaway bot using MongoDB. Once a new giveaway is created the bot runs the following code to write the new giveaway into the databank: Giveaways should be a nested document in the document with the server’s information. My schemas for this looks like this: In my Mongo At…

HTML if else condition for printing items in list

I’m making a website with flask, and I pass in a list. My .html file has this code: Now if list.length == 0 I want it to just do something like instead. How do I make an if statement to check if the list is empty, and if it is then I print error on the website, if it is