Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


8,299 Points

Less of a question, more of a thank you!

Hey all,

So today I've been working on DOM Scripting by Example (JavaScript) and the lesson challenges us to solve a small issue. Surprisingly to me I managed to do it; I now have recounted all the times in the past month I've doubted myself and just want to thank treehouse for providing such a piece of content that if done independently, is unbelievably motivating.

If anyone is struggling, please just carry on. Whatever your struggle is, just keep marching on-wards! Mine is logic, I can remember all the methods, all the ways code works but the logic I find so difficult. Today I finally faced a logic problem and solved it, no matter how simple / small it is - it is great.

Anyone curious in the code, here it is:

          My first true code block, 
          I now understand what block scope is and solved this myself. Damn!
    } else if (button.textContent === 'save') {
        const span = document.createElement('span');
        const input = li.firstElementChild;
        span.textContent = input.value;
        li.insertBefore(span, input); // this was my first lightbulb moment
        li.removeChild(input); // I originally had them the otherway around
        button.textContent = 'edit';

Thank you to all the community and everyone who has helped me thus far, I can feel I'm gonna be marching on-wards from this point!

Have a great day everyone, Alex.