Learn Form Validation by Building a Calorie Counter - Step 52

Tell us what’s happening:

On step 52, when I replace the innerHTML with the insertAdjacentHTML()-Method, I either get the hint " You should call the insertAdjacentHTML() method of targetInputContainer ." if I use the insertAdjacentHTML() without the brackets, or nothing at all if I include the brackets. Nothing else changed otherwise in the code.
Looking up the insertAdjacentHTML method itself, I find results that say that a position is required; is that missing?

### Your code so far

targetInputContainer.insertAdjacentHTML() += HTMLString;

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36

Challenge Information:

Learn Form Validation by Building a Calorie Counter - Step 52

3 Likes

insertAdjacentHTML() is a method that will later be passed an argument inside the parentheses ()

You should not try to assign it a value using = because if that worked it would overwrite the method itself.

All you have to do is remove += HTMLString

5 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.