DEV Community

loading...

Your boat is sinking, you think you can make it to land, but you can only...

mjsarfatti profile image Manuele J Sarfatti ・1 min read

...save one flavour of JavaScript: OO or functional.

Which one do you bring with you and why?

Discussion

pic
Editor guide
Collapse
nicolus profile image
Nicolas Bailly

Typescript, which is the only sane way to do Object Oriented javascript.

Collapse
tobiassn profile image
Tobias SN

I give a Swimmer class to OOP and save functional.

Collapse
mjsarfatti profile image
Collapse
khalyomede profile image
Khalyomede

POP, because it offers runtime mutation of the code, I like it a lot

Collapse
mjsarfatti profile image
Manuele J Sarfatti Author

You mean OOP right?

Collapse
khalyomede profile image
Khalyomede

Nope, I mean prototype 🤓

Thread Thread
mjsarfatti profile image
Collapse
nicholascloud profile image
Nicholas Cloud

Prototypal.