Learn Form Validation by Building a Calorie Counter - Step 40

Tell us what’s happening:

Здравствуйте! Помогите, пожалуйста, не пойму, что не так function addEntry() {
const targetInputContainer = document.querySelector(‘#$ {targetId} .input-container’);
}

Your code so far

<!-- file: index.html -->

/* file: styles.css */

/* file: script.js */
// User Editable Region

function addEntry() {
   const targetInputContainer = document.querySelector('#$ {targetId} .input-container');
    }

// User Editable Region

Your browser information:

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

Challenge Information:

Learn Form Validation by Building a Calorie Counter - Step 40

You’re missing some code from the start of step 40. Reset the lesson to get it back.

You’ve added more code inside the brackets than you needed to. The instructions say:

“Use concatenation to separate targetId and '.input-container' with a space”

You have already defined targetId above (which you deleted and need to recover) so you can just use that word.

This might help you with concatenation:

Спасибо! Все получилось!!!

1 Like