Navigate

Friday, April 14, 2017

GA - Week 3

This week we learned about javascript classes and how inheritance works. Essentially it's a great way to recreate objects a bunch of times kind of like having a template and a printer. The class spits out a 'new' whatever the function creates when you initialize it with the 'new' keyword. I should also mention that classes are declared with a capital letter unlike regular functions. I understand what it does, but I'm still having trouble implementing it. 

We also were introduced to jQuery which is a javascript library that makes javascript easier to use because it's syntax is very similar to english. So when you're writing your code, you can replace the `document.` with the jquery symbol `$`. You can learn more about it at the W3Schools site.

In the development community, there's a bit of a yays vs. nays on whether to use jQuery. jQuery was created back when javascript was a lot more difficult to use, specifically before it had query selectors (which let you find anything in the dom) and classes (to recreate things). But I think I'm leaning on the side of our instructor...it's more beneficial to use vanilla javascript and understand how it works before getting into using shortcuts.

And so I created this tic-tac-toe game using vanilla javascript. Check it out here.


~ Lisa Lou

No comments:

Post a Comment

Let me know what you think....