From the course: JavaScript: Enhancing the DOM

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Solution: Shapeshifter

Solution: Shapeshifter

(upbeat music) - [Narrator] Great job on attempting the Shapeshifter challenge. Let's review a possible solution. As you can see, I'm first selecting the dynamic text, and then I'm altering the style on line 6, 9, 12, and 16. In order to toggle the bold, I'm using an isBold helper value, and I'm setting that to its opposite on line 13. So let's go ahead and press the button. As you can see, all the styles get added and is displayed in a new way. So remember, practicing these methods will make you more proficient in creating dynamic and interactive webpages. It's very normal to not get it right on the first try.

Contents