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

JavaScript Interactive Web Pages with JavaScript Traversing and Manipulating the DOM with JavaScript Perform: Appending and Removing Elements

rajbee
rajbee
6,657 Points

A list of the javascript notes that MDN documentation might not teach you ?

Its good to use the MDN documentation to intuitively look or search for functions that do something you want. But what if could can't find it easily ? For example, You want to remove a paragraph from a document that has only one paragraph. You won't find any function which does this. The solution is here - http://stackoverflow.com/questions/3387427/remove-element-by-id

You cannot delete an element directly. You must get its parent and then delete it using parent.removeChild(child).

Is there a list of such things to know in Javascript ?

2 Answers

I believe such a list would be terribly vast. You were obviously able to find the answer to your question using Stack Exchange...and I think this is an excellent way to search for issues particularly because some of the questions posed there do not represent the basic (atomic) features of JavaScript, but often the solutions to "practical" problems. We see molecular solutions rather than bits of valid syntax.

In other words, an enumeration of elementary functions available in JavaScript will never correlate one-to-one with the true number of solutions engineered by patient people who understand the language. My answer is that you shouldn't hope for a "list" but rather just to accept the fact that the problem will sometimes be more complicated than the solutions offered by native functions and libraries. As technologies evolve, the solutions must too.

I think your question is an excellent one, and perhaps someone with more experience might offer a different answer, but I hope that gives you something to consider!

If you have a MAc i'd recommend Dash. It makes documentation available locally for quick searches using keywords and you get results from google and stackoverflow when connected to the internet. I don't know of any Windows or Linux alternatives though.

interesting! I'll have to check this out.