I have created a div element to nest img element each time the search btn is pressed div element is formatted and new img element are created the application is working perfectly in the preview but all the conditions associated with the img element are not met what could be possible reason please help me out
When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.
I have an exmple to build a pokemon search app. Building a Pokémon Search App is a great way to practice web development skills. Below is a basic example of how you can create such an app using HTML, CSS, and JavaScript. This example allows users to search for a Pokémon by name or ID and displays relevant information.
You can try this code.
code removed by moderator
Here is the detailed explation of code: Explanation:
HTML: Sets up the structure of the app, including an input field for the Pokémon name or ID, a search button, and elements to display the Pokémon’s information.
CSS: Provides basic styling to center the content and style the input, button, and information display.
JavaScript: Adds an event listener to the search button. When clicked, it fetches data from the PokéAPI based on the user’s input. If the Pokémon is found, it displays the information; otherwise, it shows an error message.
Do not write code for people, this is a certification project and so it is against the Academic Honesty Pledge
It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge. How to Help Someone with Their Code Using the Socratic Method
We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.
Your practice of declaring all of the characteristic labels for the different stat categories, it’s legal Javascript but people will still give you marks against doing this, because destructuring ( “const [ height, weight, whatever, whatever1, whatever5 ] = your_object” ) is what people who know what destructuring is do, and the course tries to teach this; moving forward continuing to do this is going to show people you don’t know what destructuring is. If those properties are present in the nesting level of that object they will be assigned appropriately. Same thing goes for accessing properties of for example, object[key1][key2ofkey1][key3ofkey2ofkey1] and the properties that may or may not exist there. if they don’t exist they should only be giving you undefined assignments.
Don’t format your written code like you are doing. The point of software documents is so that people other than you can quickly read what you’re thinking & driving at. And it is currently hard to read because you aren’t creating new lines at the beginning of every callback response.
Also I don’t think you’re actually running any code when you write this function as it is because lexical arrow functuons (const = () =>) are returned when you assign them to a new variable and you’re treating them as if they are a function declaration (that follows function(){} syntax)