In Angular you are not querying the DOM from the js code.
Yep, this one is another AgnularJS fanboy posts. I originally learned this when it was mentioned as a side note in one of Lukas Rubelke's lectures link: (https://frontendmasters.com/courses/pulling-together/#v=j680h5kqqz). Someone asked, "Why is ng-click better than using JQuery (the .click() syntax) or plain vanilla javascript (addEventListener syntax)?". Lukas responded with a great point- In Angular you are not querying the DOM from the js code.
0 Comments
Last night was event for the meetup "JS Sharefest". Here's the link to the event: http://www.meetup.com/hudson-county-javascript-meetup/events/228176942/ A Bar is a Nice Meetup Spot.After watching a very funny javascript video I was inspired to start omitting semicolons at the end of the lines in my code. At first it seemed weird, since in Java and other languages they are necessary for the compiler to function properly. This got me wondering, "how does the compiler know the statements should end if we don't use semicolons?". Welp, it turns out that the compiler does some magical thing called "automatic semicolon insertion", and the rules are quite complicated. If you want to read into it, here's a great link to the source that I a stack exchange poster noted in his answer.
Back in the Flash days (I'm not that old, really) we would call the first class that is run when your application starts up the document class. In was common to call this class Main.as or just the name of your project with dot as after it. The language didn't force you to use any specific file name, but it didn't give any special treatment to any name in particular either. Well, in Node.js the creators have blessed us with some special features of a Javascript file named index.js. The name and function is similar to html's index.html as the main html file for a page.
I like this site a lot because it is a much more interactive way to learn HTML and Javascript than most other sites. Instead of just a static page of text or a simple video file, this site is built in Javascript and is itself a simplified code editor. The lessons are called challenges, and you have to get the code correct to beat the challenge. Here's a screenshot:
|
AuthorThe posts on this site are written and maintained by Jim Lynch. About Jim...
Categories
All
Archives
March 2023
|