Skip to content
Advertisement

Tag: loops

Showing dates on HTML on option select

I am working on an HTML file that has a drop-down list of months. When I select a month, I want the function to show the dates of the month on the page in this format: 1st of December 2020 2nd of December 2020 . . . 31st of December 2020 Below is my html: I cannot get the function

How to loop through complex JSON tree data?

Problem: I am given JSON tree data that looks something like below: The objective is to take the json object and its id and find matching object with id. let’s just assume its been parsed so it’s treated like an object. Basically, I don’t know how deeply each set of id and name is nested. So I know I would

How to print items within an array sequentially

I’m learning Node and I’m attempting to create a readme generator. I’ve created my prompts to confirm if the user would like to add gifs/images to their markdown. I’ve made it so that if the user confirmed then they can enter in the number and then I pass it into a for loop that generators the markdown text for adding

Advertisement