title: what should i do when" "Array.forEach (<anonymous>)" this is shown in console while i am using the following code in javascript
body: <pre><code>    [inpTitle, inpBody].forEach(inputField =&gt; {
          inputField.addEventListener(&quot;blur&quot;, () =&gt; {
              const updatedTitle = inpTitle.value.trim();
              const updatedBody = inpBody.value.trim();
  
              this.onNoteEdit(updatedTitle, updatedBody);
          });
      });
  </code></pre>
  <p>this error is being shown in the console too
  Uncaught TypeError: Cannot read properties of null (reading 'addEventListener')</p>