The script is not working as expected. Let’s fix it.
When the textarea element receives focus, the form focused message should appear first in the console.
After that, the message textarea focused should appear.
In this case, the function handlers should be preserved.

This task is part of the Full-Stack JavaScript Course
If you have any issues with it, you can ask for community help below the post
Feel free to help others if you’ve already solved the task

index.html

<!DOCTYPE html>
<html>
  <head>
    <title>My blog</title>
    <style>
      textarea {
        display: block;
      }
    </style>
  </head>
  <body>
    <form name="blog">
      <label for="post">Create blog post</label>
      <textarea name="post" id="post" cols="30" rows="10"></textarea>
    </form>
    <script>
      const form = document.forms.blog;
      form.addEventListener('focus', () => {
        console.log('form focused');
      });
      const textarea = form.elements.post;
      textarea.addEventListener('focus', () => {
        console.log('textarea focused');
      });
    </script>
  </body>
</html>