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

can i code this application just in javascript without using DOM?

JUST i want to ask if i can code this application in javascript without DOM because i see it a little confusing me , and i want to know if i understand well that i can use it without DOM... because my language isn't english

2 Answers

I'm not sure what application you mean (a Treehouse course?) but the answer is probably no.

The DOM is how Javascript interacts with the document in the browser. It's possible to write a program in Javascript without the DOM but it wouldn't influence anything the user can see/interact with. Think of a tree falling in the forest when no one is around.

to-do list application in a treehouse course i mean coding the app by jquery without DOM

After your clarification: technically, no. JQuery still interacts with the DOM.

Yes, you can most definitely build it using JQuery and not call vanilla JsvaScript methods like getElementsByClassName, but I don't think it's a good idea. If you don't understand how Javascript is working with the DOM, it's going to make it really challenging as the programs you write get more complex. JQuery is an abstraction layer ONLY - make you sure you get what's going on under the hood before you charge ahead.

jquery is more simple and easier than DOM ... i think i can do everythink in jquery without dom ..dom is more difficult .. i asked the teacher that taught me the javascript he said like what i said....