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


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