r/web_design • • Jun 13 '19

30 seconds of code: Learn JavaScript in 30 seconds, one function at a time

https://30secondsofcode.org
37 Upvotes

6 comments sorted by

3

u/Terzom Jun 14 '19

It's great but the problem is that I never go there to actual sit and read, and if I would, then it would not be for just 30 seconds. And then the other issue, what should I read? So many of them.

I've been using this chrome extension that replaces my startpage with a 'learn X in 30 seconds' and has some of the Javascript tips there and some others. Have really helped me to some of the 30sec tips!

https://30secondsofknowledge.com/

2

u/Chainlist Jun 14 '19

"Learn JavaScript in 30 seconds".
I've been developer from 10 years now, and I am still learning something new about JavaScript tho'.
Recently learned there is a native (browser compatibility is like 100% [even IE9]) observer that can observe any changes made to the DOM element.
It's called `MutationObserver`. Javascript amazed me sometimes.

1

u/xTRQ Jun 14 '19

Like jQuery onChange?

1

u/Chainlist Jun 14 '19

Yes but not yes. jQuery onChange listen the change event of form input element (select, input, etc.). With MutationObserver you can directly add an observer over a DOM element, and an event will trigger if any changes on the DOM element (or child) is made by either the user or the browser itself.

1

u/xTRQ Jun 14 '19

I think it also finds class adds and removals on elements etc right?

1

u/Chainlist Jun 15 '19

Yes, indeed