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 jQuery Basics (2014) Creating a Password Confirmation Form Perfect

Kim Still
Kim Still
7,355 Points

Is this how you would code a sign up form normally?

Obviously the point of this class is to learn the basics of jQuery, but I'm wondering if this is how most sign-up form hints are coded in the wild?

I was surprised at the length of our code at the end and thinking about mobile, I would imagine that lines of code eventually add up to slower load times.

Is there a more efficient way a seasoned developer would approach this problem?

1 Answer

Hey Kim,

Not sure what code you are looking at but if you want to post it I can tell you how the "wild" would do it.

JQuery is great because it reduces a lot of the JavaScript we need to write however sometimes not every situation will use just jQuery. Unless you are working on huge websites that are constantly sending data back and forth I wouldn't worry too much about load times.

if its a simple form I'm sure you aren't looking at more than maybe 50 lines of code. Enjoy that now. I worked on a form today sifting through close to 1000 lines of code that have been patched up by numerous developers with different skill sets. Just get into the rhythm of writing clean organized code that is well commented cause if you come back a couple of weeks later to make edits, I'll guarentee it will take a while to remember where you left off, especially if it's not organized.

Hope this helps a bit.

Joe