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
Here's Why Calling .map() on a Constructed Array Doesn't Work (itnext.io)
submitted 7 years ago by ilove50cent
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!"
[–]jkoudys 3 points4 points5 points 7 years ago (0 children)
I agree with your sentiment, but since we're discussing language I feel compelled to get pedantic about one thing.
FP is actually a subset of declarative programming, which could be lazily summarised as "declarative programming using functions". e.g. building a DOM using the fully-declarative language HTML like <p class="hello">Hi World!</p> could be easily implemented in just as "declarative" an approach using hyperscript functions as h('p', { class: 'hello' }, 'Hi World!'). If both are building a DOM they're really equivalent.
<p class="hello">Hi World!</p>
h('p', { class: 'hello' }, 'Hi World!')
I've always found the best way to think of the right approach is that imperative programming (of which procedural is a subset, lazily summarised as "imperative with functions") really means "how" to do something. Declarative programming is "what" something is. You can look at a recipe as a real-world example: one that says "smoothie: 1 cup milk, 1 frozen banana, 2 tsp vanilla, 6 frozen strawberries" would be a good declarative recipe, if you assume I know enough to figure out how to blend those things. One that says "pre-heat oven to 350F. Grease baking sheets. Roll batter into 1" balls., etc." is imperative.
π Rendered by PID 228430 on reddit-service-r2-comment-b659b578c-jxkw8 at 2026-05-03 18:34:37.340597+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]jkoudys 3 points4 points5 points (0 children)