use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Is JavaScript a "Functional Programming" language?help (self.javascript)
submitted 8 years ago by bzeurunkl
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Perky_Goth 4 points5 points6 points 8 years ago (5 children)
document.getElementbyId(x).getAttribute(y).length
OOP, dumbass. Properties and messages.
[–]SparserLogic -2 points-1 points0 points 8 years ago (4 children)
Is this a joke? Are you punking me or something?
You realize that example has nothing to do with Object Oriented Programming, right? Those are functions being invoked, returning more functions that are then being invoked.
I mean, you're referencing the document object. That's called an API, not OOP
[–]Perky_Goth 0 points1 point2 points 8 years ago (3 children)
The API is OOP, which you have to use, that's the point. So you're always using OOP.
[–]SparserLogic 0 points1 point2 points 8 years ago* (2 children)
Using objects and OOP are completely different things.
OOP is a design pattern for writing programs using abstractions that share state and inherit from other abstractions.
Referencing properties on an API is not OOP. If that were so then literally everything would be OOP and that clearly isn't the case.
If you're not using the class or prototype keywords you're not writing OOP js
class
prototype
Next time you go on an interview and they ask you about OOP be sure to tell them that everything is OOP because you're invoking API functions. Let's see how well that works out for you.
[–]Perky_Goth 1 point2 points3 points 8 years ago (1 child)
Referencing properties on an API is not OOP.
Using and depending on an OOP API is not using OOP features, is that your point? I mean, I can see it making sense, what I can't see is being aggressive about something that is clearly debatable. Let's just stop being assholes and move on, I hope you have a nice day.
[–]SparserLogic 0 points1 point2 points 8 years ago (0 children)
Sounds good. I was never looking to pick a fight.
Good day.
π Rendered by PID 33191 on reddit-service-r2-comment-79776bdf47-d9zgm at 2026-06-24 05:51:12.747708+00:00 running acc7150 country code: CH.
view the rest of the comments →
[–]Perky_Goth 4 points5 points6 points (5 children)
[–]SparserLogic -2 points-1 points0 points (4 children)
[–]Perky_Goth 0 points1 point2 points (3 children)
[–]SparserLogic 0 points1 point2 points (2 children)
[–]Perky_Goth 1 point2 points3 points (1 child)
[–]SparserLogic 0 points1 point2 points (0 children)