JavaScript OOP in JavaScript is so confusing, ES6 is great but not well supported, what to do?

I just watched The Definitive Guide to Object-Oriented JavaScript. I will never learn how to do OOP in classical way. It mentioned the new spec (ES6). But as far as I know it is not well supported. Is there any workaround to make OOP easier in JavaScript?

Answer:1

I agree, it is very confusing. But you are lucky to join the community now. Babel.js will make your job very easy. If you are not familiar with JavaScript tooling, I recommend you to install Yeoman and find the generator that you like for your project. Most of the famous framework/libraries's generators have Babel prebuilt into them. If you are familiar with docker, run yeoman container to get started with one line of code!

Edit: You can try generator-webapp container to get started.

Answer:2

Considering the following code snippet, function outer(data1){ function inner(){ console.log(data1); } return inner; } in the following two function calls, first one works but ...

Considering the following code snippet, function outer(data1){ function inner(){ console.log(data1); } return inner; } in the following two function calls, first one works but ...

  1. closure working javascript
  2. javascript closure not working

Similar questions have been asked before, but I'm looking for the "opposite" solution than all the others ;-) I need a JavaScript event that fires when a user decides for an option in a select field. ...

Similar questions have been asked before, but I'm looking for the "opposite" solution than all the others ;-) I need a JavaScript event that fires when a user decides for an option in a select field. ...

  1. javascript make select readonly
  2. javascript make select required
  3. javascript make select option unselectable
  4. javascript make select option selected
  5. javascript make select disabled
  6. javascript make select option disabled
  7. javascript make select box readonly
  8. javascript make select option readonly
  9. javascript make select
  10. javascript make select empty
  11. javascript make select dropdown
  12. javascript make select list
  13. javascript make select element
  14. javascript make select option hidden

This is my CSS, in which, three keyframes are bound together to make a chain animation #anim-div{ -webkit-animation-name : mpbar-anim-page1, mpbar-anim-page2, mpbar-anim-page3; animation-...

This is my CSS, in which, three keyframes are bound together to make a chain animation #anim-div{ -webkit-animation-name : mpbar-anim-page1, mpbar-anim-page2, mpbar-anim-page3; animation-...

If a new ranking is clicked how can we automatically declick the previous click? <%= f.hidden_field(:ranking, id: 'ranking') %> <%= image_tag('4.png', data: { ranking: 4 }, class: 'image-...

If a new ranking is clicked how can we automatically declick the previous click? <%= f.hidden_field(:ranking, id: 'ranking') %> <%= image_tag('4.png', data: { ranking: 4 }, class: 'image-...

  1. addclass removeclass onclick
  2. addclass removeclass click