{
  "kind":"Listing",
  "data":{
    "modhash":"",
    "children":[
      {
        "kind":"t3",
        "data":{
          "domain":"self.javascript",
          "banned_by":null,
          "media_embed":{

          },
          "subreddit":"javascript",
          "selftext_html":"&lt;!-- SC_OFF --&gt;&lt;div class=\"md\"&gt;&lt;p&gt;To the few users who are reporting spam: thank you.  I appreciate it.  Sometimes it&amp;#39;s not obvious because they&amp;#39;re tech articles and I don&amp;#39;t have time to check user profiles etc...&lt;/p&gt;\n\n&lt;p&gt;To those who haven&amp;#39;t noticed much spam: that&amp;#39;s probably because it&amp;#39;s not &amp;quot;traditional&amp;quot; spam. They&amp;#39;re not links to scam or porn sites - it&amp;#39;s users abusing &lt;a href=\"/r/javascript\"&gt;/r/javascript&lt;/a&gt; and using it as a promotional tool to get traffic to their (usually ad-ridden) blogs.&lt;/p&gt;\n\n&lt;p&gt;I don&amp;#39;t want to discourage users from posting their own content. The nature of programming is that you want to share your stuff.  You should clearly say in the title or comments that it&amp;#39;s your own, and you should at least make some effort to participate in other threads in &lt;a href=\"/r/javascript\"&gt;/r/javascript&lt;/a&gt; if you can.&lt;/p&gt;\n\n&lt;p&gt;If you want to post your own stuff, you should read the reddiquette and understand reddit&amp;#39;s rules.  You should be an active participant in the reddit community, and you must still mostly post useful and interesting things that are not your own content.  We tend to be a little more lax than reddit&amp;#39;s &lt;a href=\"http://www.reddit.com/wiki/selfpromotion\"&gt;self promotion guidelines&lt;/a&gt; (e.g. the suggested 90/10 rule), but that doesn&amp;#39;t mean we&amp;#39;re not keeping an eye on people who are just posting here for SEO / driving ad traffic.&lt;/p&gt;\n\n&lt;p&gt;If it&amp;#39;s clear you just created the account so that you could promote your blog/posts on reddit, you may be banned from posting here. This isn&amp;#39;t a free promotional tool for you to drive traffic or increase SEO, and spamming &lt;a href=\"/r/javascript\"&gt;/r/javascript&lt;/a&gt; will not be tolerated.&lt;/p&gt;\n\n&lt;p&gt;We mods need your help, readers, in identifying spammers.  Thanks to those already helping out!&lt;/p&gt;\n&lt;/div&gt;&lt;!-- SC_ON --&gt;",
          "selftext":"To the few users who are reporting spam: thank you.  I appreciate it.  Sometimes it's not obvious because they're tech articles and I don't have time to check user profiles etc...\n\nTo those who haven't noticed much spam: that's probably because it's not \"traditional\" spam. They're not links to scam or porn sites - it's users abusing /r/javascript and using it as a promotional tool to get traffic to their (usually ad-ridden) blogs.\n\nI don't want to discourage users from posting their own content. The nature of programming is that you want to share your stuff.  You should clearly say in the title or comments that it's your own, and you should at least make some effort to participate in other threads in /r/javascript if you can.\n\nIf you want to post your own stuff, you should read the reddiquette and understand reddit's rules.  You should be an active participant in the reddit community, and you must still mostly post useful and interesting things that are not your own content.  We tend to be a little more lax than reddit's [self promotion guidelines](http://www.reddit.com/wiki/selfpromotion) (e.g. the suggested 90/10 rule), but that doesn't mean we're not keeping an eye on people who are just posting here for SEO / driving ad traffic.\n\nIf it's clear you just created the account so that you could promote your blog/posts on reddit, you may be banned from posting here. This isn't a free promotional tool for you to drive traffic or increase SEO, and spamming /r/javascript will not be tolerated.\n\nWe mods need your help, readers, in identifying spammers.  Thanks to those already helping out!",
          "likes":null,
          "secure_media":null,
          "link_flair_text":null,
          "id":"1qyqvn",
          "gilded":0,
          "secure_media_embed":{

          },
          "clicked":false,
          "stickied":true,
          "author":"honestbleeps",
          "media":null,
          "score":55,
          "approved_by":null,
          "over_18":false,
          "hidden":false,
          "thumbnail":"",
          "subreddit_id":"t5_2qh30",
          "edited":1393178756,
          "link_flair_css_class":null,
          "author_flair_css_class":"",
          "downs":36,
          "saved":false,
          "is_self":true,
          "permalink":"/r/javascript/comments/1qyqvn/sticky_please_report_spam_here_when_you_see_it/",
          "name":"t3_1qyqvn",
          "created":1384849309,
          "url":"http://www.reddit.com/r/javascript/comments/1qyqvn/sticky_please_report_spam_here_when_you_see_it/",
          "author_flair_text":"Reddit Enhancement Suite",
          "title":"[sticky] please report spam here when you see it. afraid you might be spamming? you probably are.",
          "created_utc":1384849309,
          "ups":91,
          "num_comments":73,
          "visited":false,
          "num_reports":null,
          "distinguished":"moderator"
        }
      },
      {
        "kind":"t3",
        "data":{
          "domain":"open.blogs.nytimes.com",
          "banned_by":null,
          "media_embed":{

          },
          "subreddit":"javascript",
          "selftext_html":null,
          "selftext":"",
          "likes":null,
          "secure_media":null,
          "link_flair_text":null,
          "id":"23abb5",
          "gilded":0,
          "secure_media_embed":{

          },
          "clicked":false,
          "stickied":false,
          "author":"tpk1024",
          "media":null,
          "score":11,
          "approved_by":null,
          "over_18":false,
          "hidden":false,
          "thumbnail":"",
          "subreddit_id":"t5_2qh30",
          "edited":false,
          "link_flair_css_class":null,
          "author_flair_css_class":null,
          "downs":2,
          "saved":false,
          "is_self":false,
          "permalink":"/r/javascript/comments/23abb5/introducing_pourover_and_tamper/",
          "name":"t3_23abb5",
          "created":1397785550,
          "url":"http://open.blogs.nytimes.com/2014/04/16/introducing-pourover-and-tamper/",
          "author_flair_text":null,
          "title":"Introducing PourOver and Tamper",
          "created_utc":1397756750,
          "ups":13,
          "num_comments":0,
          "visited":false,
          "num_reports":null,
          "distinguished":null
        }
      },
      {
        "kind":"t3",
        "data":{
          "domain":"pasm.pis.to",
          "banned_by":null,
          "media_embed":{

          },
          "subreddit":"javascript",
          "selftext_html":null,
          "selftext":"",
          "likes":null,
          "secure_media":null,
          "link_flair_text":null,
          "id":"239crf",
          "gilded":0,
          "secure_media_embed":{

          },
          "clicked":false,
          "stickied":false,
          "author":"pdpi",
          "media":null,
          "score":21,
          "approved_by":null,
          "over_18":false,
          "hidden":false,
          "thumbnail":"",
          "subreddit_id":"t5_2qh30",
          "edited":false,
          "link_flair_css_class":null,
          "author_flair_css_class":null,
          "downs":3,
          "saved":false,
          "is_self":false,
          "permalink":"/r/javascript/comments/239crf/piston_x8664_assembler_works_in_browser_and_nodejs/",
          "name":"t3_239crf",
          "created":1397760557,
          "url":"http://pasm.pis.to/",
          "author_flair_text":null,
          "title":"Piston x86-64 Assembler (works in browser and Node.js)",
          "created_utc":1397731757,
          "ups":24,
          "num_comments":7,
          "visited":false,
          "num_reports":null,
          "distinguished":null
        }
      },
      {
        "kind":"t3",
        "data":{
          "domain":"i.imgur.com",
          "banned_by":null,
          "media_embed":{

          },
          "subreddit":"javascript",
          "selftext_html":null,
          "selftext":"",
          "likes":null,
          "secure_media":null,
          "link_flair_text":null,
          "id":"236v88",
          "gilded":0,
          "secure_media_embed":{

          },
          "clicked":false,
          "stickied":false,
          "author":"samyel",
          "media":null,
          "score":232,
          "approved_by":null,
          "over_18":false,
          "hidden":false,
          "thumbnail":"",
          "subreddit_id":"t5_2qh30",
          "edited":false,
          "link_flair_css_class":null,
          "author_flair_css_class":null,
          "downs":66,
          "saved":false,
          "is_self":false,
          "permalink":"/r/javascript/comments/236v88/what_it_felt_like_looking_for_nonjquery_help/",
          "name":"t3_236v88",
          "created":1397693546,
          "url":"http://i.imgur.com/qWUFVfS.png",
          "author_flair_text":null,
          "title":"What it felt like looking for non-jQuery help",
          "created_utc":1397664746,
          "ups":298,
          "num_comments":137,
          "visited":false,
          "num_reports":null,
          "distinguished":null
        }
      },
      {
        "kind":"t3",
        "data":{
          "domain":"github.com",
          "banned_by":null,
          "media_embed":{

          },
          "subreddit":"javascript",
          "selftext_html":null,
          "selftext":"",
          "likes":null,
          "secure_media":null,
          "link_flair_text":null,
          "id":"23a2dr",
          "gilded":0,
          "secure_media_embed":{

          },
          "clicked":false,
          "stickied":false,
          "author":"faruzzy",
          "media":null,
          "score":3,
          "approved_by":null,
          "over_18":false,
          "hidden":false,
          "thumbnail":"",
          "subreddit_id":"t5_2qh30",
          "edited":false,
          "link_flair_css_class":null,
          "author_flair_css_class":null,
          "downs":2,
          "saved":false,
          "is_self":false,
          "permalink":"/r/javascript/comments/23a2dr/kendo_ui_core_open_sourced/",
          "name":"t3_23a2dr",
          "created":1397780517,
          "url":"https://github.com/telerik/kendo-ui-core",
          "author_flair_text":null,
          "title":"Kendo UI Core Open Sourced",
          "created_utc":1397751717,
          "ups":5,
          "num_comments":0,
          "visited":false,
          "num_reports":null,
          "distinguished":null
        }
      },
      {
        "kind":"t3",
        "data":{
          "domain":"smalljs.org",
          "banned_by":null,
          "media_embed":{

          },
          "subreddit":"javascript",
          "selftext_html":null,
          "selftext":"",
          "likes":null,
          "secure_media":null,
          "link_flair_text":null,
          "id":"23aozu",
          "gilded":0,
          "secure_media_embed":{

          },
          "clicked":false,
          "stickied":false,
          "author":"airportyh",
          "media":null,
          "score":1,
          "approved_by":null,
          "over_18":false,
          "hidden":false,
          "thumbnail":"",
          "subreddit_id":"t5_2qh30",
          "edited":false,
          "link_flair_css_class":null,
          "author_flair_css_class":null,
          "downs":0,
          "saved":false,
          "is_self":false,
          "permalink":"/r/javascript/comments/23aozu/small_clientside_routing_library_page/",
          "name":"t3_23aozu",
          "created":1397793593,
          "url":"http://smalljs.org/client-side-routing/page/",
          "author_flair_text":null,
          "title":"Small Client-Side Routing Library: Page",
          "created_utc":1397764793,
          "ups":1,
          "num_comments":0,
          "visited":false,
          "num_reports":null,
          "distinguished":null
        }
      },
      {
        "kind":"t3",
        "data":{
          "domain":"janrikviljanen.info",
          "banned_by":null,
          "media_embed":{

          },
          "subreddit":"javascript",
          "selftext_html":null,
          "selftext":"",
          "likes":null,
          "secure_media":null,
          "link_flair_text":null,
          "id":"23ao87",
          "gilded":0,
          "secure_media_embed":{

          },
          "clicked":false,
          "stickied":false,
          "author":"kylixi",
          "media":null,
          "score":2,
          "approved_by":null,
          "over_18":false,
          "hidden":false,
          "thumbnail":"",
          "subreddit_id":"t5_2qh30",
          "edited":false,
          "link_flair_css_class":null,
          "author_flair_css_class":null,
          "downs":0,
          "saved":false,
          "is_self":false,
          "permalink":"/r/javascript/comments/23ao87/javascript_fading_effects/",
          "name":"t3_23ao87",
          "created":1397793140,
          "url":"http://www.janrikviljanen.info/2014/04/javascript-fading-effects.html",
          "author_flair_text":null,
          "title":"Javascript Fading effects",
          "created_utc":1397764340,
          "ups":2,
          "num_comments":0,
          "visited":false,
          "num_reports":null,
          "distinguished":null
        }
      },
      {
        "kind":"t3",
        "data":{
          "domain":"weworkweplay.com",
          "banned_by":null,
          "media_embed":{

          },
          "subreddit":"javascript",
          "selftext_html":null,
          "selftext":"",
          "likes":null,
          "secure_media":null,
          "link_flair_text":null,
          "id":"2398vb",
          "gilded":0,
          "secure_media_embed":{

          },
          "clicked":false,
          "stickied":false,
          "author":"recyclerobot",
          "media":null,
          "score":9,
          "approved_by":null,
          "over_18":false,
          "hidden":false,
          "thumbnail":"",
          "subreddit_id":"t5_2qh30",
          "edited":false,
          "link_flair_css_class":null,
          "author_flair_css_class":null,
          "downs":5,
          "saved":false,
          "is_self":false,
          "permalink":"/r/javascript/comments/2398vb/how_to_save_your_canvas_as_an_image_in_javascript/",
          "name":"t3_2398vb",
          "created":1397754834,
          "url":"http://weworkweplay.com/play/saving-html5-canvas-as-image/",
          "author_flair_text":null,
          "title":"How to save your &lt;canvas&gt; as an image in javascript",
          "created_utc":1397726034,
          "ups":14,
          "num_comments":7,
          "visited":false,
          "num_reports":null,
          "distinguished":null
        }
      },
      {
        "kind":"t3",
        "data":{
          "domain":"uthweb.com",
          "banned_by":null,
          "media_embed":{

          },
          "subreddit":"javascript",
          "selftext_html":null,
          "selftext":"",
          "likes":null,
          "secure_media":null,
          "link_flair_text":null,
          "id":"239anl",
          "gilded":0,
          "secure_media_embed":{

          },
          "clicked":false,
          "stickied":false,
          "author":"uthweb",
          "media":null,
          "score":3,
          "approved_by":null,
          "over_18":false,
          "hidden":false,
          "thumbnail":"",
          "subreddit_id":"t5_2qh30",
          "edited":false,
          "link_flair_css_class":null,
          "author_flair_css_class":null,
          "downs":4,
          "saved":false,
          "is_self":false,
          "permalink":"/r/javascript/comments/239anl/video_tutorials_to_learn_javascript/",
          "name":"t3_239anl",
          "created":1397757525,
          "url":"http://www.uthweb.com/linux/tutorials/150-video-tutorials-to-learn-javascript/",
          "author_flair_text":null,
          "title":"Video Tutorials To Learn JavaScript!",
          "created_utc":1397728725,
          "ups":7,
          "num_comments":3,
          "visited":false,
          "num_reports":null,
          "distinguished":null
        }
      },
      {
        "kind":"t3",
        "data":{
          "domain":"davidwalsh.name",
          "banned_by":null,
          "media_embed":{

          },
          "subreddit":"javascript",
          "selftext_html":null,
          "selftext":"",
          "likes":null,
          "secure_media":null,
          "link_flair_text":null,
          "id":"239k4z",
          "gilded":0,
          "secure_media_embed":{

          },
          "clicked":false,
          "stickied":false,
          "author":"arch4ngel",
          "media":null,
          "score":0,
          "approved_by":null,
          "over_18":false,
          "hidden":false,
          "thumbnail":"",
          "subreddit_id":"t5_2qh30",
          "edited":false,
          "link_flair_css_class":null,
          "author_flair_css_class":null,
          "downs":5,
          "saved":false,
          "is_self":false,
          "permalink":"/r/javascript/comments/239k4z/write_better_javascript_with_promises/",
          "name":"t3_239k4z",
          "created":1397768421,
          "url":"http://davidwalsh.name/write-javascript-promises",
          "author_flair_text":null,
          "title":"Write Better JavaScript with Promises",
          "created_utc":1397739621,
          "ups":5,
          "num_comments":4,
          "visited":false,
          "num_reports":null,
          "distinguished":null
        }
      },
      {
        "kind":"t3",
        "data":{
          "domain":"forio.com",
          "banned_by":null,
          "media_embed":{

          },
          "subreddit":"javascript",
          "selftext_html":null,
          "selftext":"",
          "likes":null,
          "secure_media":null,
          "link_flair_text":null,
          "id":"23866w",
          "gilded":0,
          "secure_media_embed":{

          },
          "clicked":false,
          "stickied":false,
          "author":"jaimedp",
          "media":null,
          "score":5,
          "approved_by":null,
          "over_18":false,
          "hidden":false,
          "thumbnail":"",
          "subreddit_id":"t5_2qh30",
          "edited":false,
          "link_flair_css_class":null,
          "author_flair_css_class":null,
          "downs":2,
          "saved":false,
          "is_self":false,
          "permalink":"/r/javascript/comments/23866w/contour_open_source_library_for_flexible_reusable/",
          "name":"t3_23866w",
          "created":1397721503,
          "url":"http://forio.com/contour/",
          "author_flair_text":null,
          "title":"Contour: open source library for flexible, re-usable and extensible javascript charts.",
          "created_utc":1397692703,
          "ups":7,
          "num_comments":0,
          "visited":false,
          "num_reports":null,
          "distinguished":null
        }
      },
      {
        "kind":"t3",
        "data":{
          "domain":"casinorpg.com",
          "banned_by":null,
          "media_embed":{

          },
          "subreddit":"javascript",
          "selftext_html":null,
          "selftext":"",
          "likes":null,
          "secure_media":null,
          "link_flair_text":null,
          "id":"236t1q",
          "gilded":0,
          "secure_media_embed":{

          },
          "clicked":false,
          "stickied":false,
          "author":"GoldFire33",
          "media":null,
          "score":18,
          "approved_by":null,
          "over_18":false,
          "hidden":false,
          "thumbnail":"",
          "subreddit_id":"t5_2qh30",
          "edited":false,
          "link_flair_css_class":null,
          "author_flair_css_class":null,
          "downs":7,
          "saved":false,
          "is_self":false,
          "permalink":"/r/javascript/comments/236t1q/we_just_launched_our_html5nodejs_mmorpg_after_2/",
          "name":"t3_236t1q",
          "created":1397692175,
          "url":"http://casinorpg.com",
          "author_flair_text":null,
          "title":"We just launched our HTML5/Node.js MMORPG after 2+ years of development",
          "created_utc":1397663375,
          "ups":25,
          "num_comments":16,
          "visited":false,
          "num_reports":null,
          "distinguished":null
        }
      },
      {
        "kind":"t3",
        "data":{
          "domain":"self.javascript",
          "banned_by":null,
          "media_embed":{

          },
          "subreddit":"javascript",
          "selftext_html":"&lt;!-- SC_OFF --&gt;&lt;div class=\"md\"&gt;&lt;p&gt;I am, my team is. Why? We are several engineers who believe that the encouraged \nlearning and use of native functionality is beneficial both to our application and\nourselves.&lt;/p&gt;\n\n&lt;p&gt;I wanted to provide some insight into what this looks like at scale \nfor those who are like-minded or curious. To show what we did or did \nnot abstract and why, and to ask if others have done the same.&lt;/p&gt;\n\n&lt;p&gt;&lt;em&gt;note: I am not interested in conversation about the pros and cons of jQuery. \nIt&amp;#39;s great. I go all the way back to late 2006 with it, shit I remember the old \nSVN repo and the 1.0 release.&lt;/em&gt;&lt;/p&gt;\n\n&lt;p&gt;When we took TaskRabbit to London (taskrabbit.co.uk) we had a &amp;#39;greenfield&amp;#39; opportunity, a clean slate. We only need support the latest browsers, and we cared just as much about the \nmobile web as desktop. This provided a great opportunity to see just how a \nlarge-scale project built around &amp;#39;Vanilla JS&amp;#39; and a minimal set of tools would evolve. We wanted \nto do more (less?) than just use Zepto instead of jQuery.&lt;/p&gt;\n\n&lt;p&gt;&lt;em&gt;note: Zepto is also great&lt;/em&gt;&lt;/p&gt;\n\n&lt;p&gt;As the codebase filled out, it was really fun to see and be part of the learnings: \n&amp;quot;Theres a classList API?&amp;quot;, &amp;quot;Hey textContent is x-browser&amp;quot;, and &amp;quot;.insertAdjacentHTML is a thing&amp;quot; \n(among many others). Having a &amp;#39;native-first&amp;#39; core value for the team brought us together and gave us a specific vision and viewpoint. We even picked up a team-member along the way and this\nmade interviewing and the subsequent hiring decision easier (as this topic tends to be polarizing).&lt;/p&gt;\n\n&lt;p&gt;When finding what we considered to be pain-points, we absracted them. Some things \noff the top of my head:&lt;/p&gt;\n\n&lt;ul&gt;\n&lt;li&gt;NodeList. How do you want to iterate it?&lt;/li&gt;\n&lt;li&gt;Events. &lt;code&gt;add/removeEventListener&lt;/code&gt; are simple and standard. But, there is a large \ncaveat for removeEventListener if you are using &lt;code&gt;Function.bind()&lt;/code&gt;. You must keep \na reference to the anonymous function returned from that call to &lt;code&gt;...bind()&lt;/code&gt; and\npass it back. Do we want to do this? Also, namespacing is useful at a large scale.&lt;/li&gt;\n&lt;li&gt;Traversal. DOM traversal is a pain.&lt;/li&gt;\n&lt;li&gt;Measuring. Differences between &lt;code&gt;window&lt;/code&gt;, &lt;code&gt;document&lt;/code&gt; and Elements can make this\novery verbose. A solid abstraction if you will be getting heights or widths regularly.&lt;/li&gt;\n&lt;/ul&gt;\n\n&lt;p&gt;We couldn&amp;#39;t find an OSS project that &amp;#39;fit our bill&amp;#39; so we &lt;a href=\"https://github.com/sudo-js/cash\"&gt;made one&lt;/a&gt;. \nAs the author I had a concept in mind. Many of the jQuery methods provide valuable abstraction still, \nbut can be greatly simplified if the &lt;code&gt;$()&lt;/code&gt; function itself is rethought. I don&amp;#39;t need a catch-all there, how about something that just normalizes the return of either a querySelector or querySelectorAll. That&amp;#39;s it. Sets that as an array and returns. simplicity.&lt;/p&gt;\n\n&lt;p&gt;There is no &amp;#39;wrapping&amp;#39;, there are no instances. There is only the normalized collection\nand a group of methods that operate on it. I wanted to encourage the use browser natives, \nnot discourage them. I wanted to frown at the use of a library to add a single class to a \nsingle element. I could go on but we can discuss this further if any are interested...&lt;/p&gt;\n\n&lt;p&gt;We built the app, shipped it, and people are using it. It has no jQuery. It&amp;#39;s lean \nand fast. It is not difficult to maintain and feature turn-around time is very \nquick. Could it have been so using with jQuery or Zepto or &amp;lt;name&amp;gt; ? Of course, my point \nis that it does not &lt;em&gt;have&lt;/em&gt; to.&lt;/p&gt;\n&lt;/div&gt;&lt;!-- SC_ON --&gt;",
          "selftext":"I am, my team is. Why? We are several engineers who believe that the encouraged \nlearning and use of native functionality is beneficial both to our application and\nourselves.\n\nI wanted to provide some insight into what this looks like at scale \nfor those who are like-minded or curious. To show what we did or did \nnot abstract and why, and to ask if others have done the same.\n\n*note: I am not interested in conversation about the pros and cons of jQuery. \nIt's great. I go all the way back to late 2006 with it, shit I remember the old \nSVN repo and the 1.0 release.*\n\nWhen we took TaskRabbit to London (taskrabbit.co.uk) we had a 'greenfield' opportunity, a clean slate. We only need support the latest browsers, and we cared just as much about the \nmobile web as desktop. This provided a great opportunity to see just how a \nlarge-scale project built around 'Vanilla JS' and a minimal set of tools would evolve. We wanted \nto do more (less?) than just use Zepto instead of jQuery.\n\n*note: Zepto is also great*\n\nAs the codebase filled out, it was really fun to see and be part of the learnings: \n\"Theres a classList API?\", \"Hey textContent is x-browser\", and \".insertAdjacentHTML is a thing\" \n(among many others). Having a 'native-first' core value for the team brought us together and gave us a specific vision and viewpoint. We even picked up a team-member along the way and this\nmade interviewing and the subsequent hiring decision easier (as this topic tends to be polarizing).\n\nWhen finding what we considered to be pain-points, we absracted them. Some things \noff the top of my head:\n\n* NodeList. How do you want to iterate it?\n* Events. `add/removeEventListener` are simple and standard. But, there is a large \ncaveat for removeEventListener if you are using `Function.bind()`. You must keep \na reference to the anonymous function returned from that call to `...bind()` and\npass it back. Do we want to do this? Also, namespacing is useful at a large scale.\n* Traversal. DOM traversal is a pain.\n* Measuring. Differences between `window`, `document` and Elements can make this\novery verbose. A solid abstraction if you will be getting heights or widths regularly.\n\nWe couldn't find an OSS project that 'fit our bill' so we [made one](https://github.com/sudo-js/cash). \nAs the author I had a concept in mind. Many of the jQuery methods provide valuable abstraction still, \nbut can be greatly simplified if the `$()` function itself is rethought. I don't need a catch-all there, how about something that just normalizes the return of either a querySelector or querySelectorAll. That's it. Sets that as an array and returns. simplicity.\n\nThere is no 'wrapping', there are no instances. There is only the normalized collection\nand a group of methods that operate on it. I wanted to encourage the use browser natives, \nnot discourage them. I wanted to frown at the use of a library to add a single class to a \nsingle element. I could go on but we can discuss this further if any are interested...\n\nWe built the app, shipped it, and people are using it. It has no jQuery. It's lean \nand fast. It is not difficult to maintain and feature turn-around time is very \nquick. Could it have been so using with jQuery or Zepto or &lt;name&gt; ? Of course, my point \nis that it does not *have* to.\n",
          "likes":null,
          "secure_media":null,
          "link_flair_text":null,
          "id":"237fkz",
          "gilded":0,
          "secure_media_embed":{

          },
          "clicked":false,
          "stickied":false,
          "author":"RobRobbins",
          "media":null,
          "score":8,
          "approved_by":null,
          "over_18":false,
          "hidden":false,
          "thumbnail":"",
          "subreddit_id":"t5_2qh30",
          "edited":1397677171,
          "link_flair_css_class":null,
          "author_flair_css_class":null,
          "downs":12,
          "saved":false,
          "is_self":true,
          "permalink":"/r/javascript/comments/237fkz/are_you_rethinking_the/",
          "name":"t3_237fkz",
          "created":1397705546,
          "url":"http://www.reddit.com/r/javascript/comments/237fkz/are_you_rethinking_the/",
          "author_flair_text":null,
          "title":"Are You Rethinking the \"$\" ?",
          "created_utc":1397676746,
          "ups":20,
          "num_comments":17,
          "visited":false,
          "num_reports":null,
          "distinguished":null
        }
      },
      {
        "kind":"t3",
        "data":{
          "domain":"self.javascript",
          "banned_by":null,
          "media_embed":{

          },
          "subreddit":"javascript",
          "selftext_html":"&lt;!-- SC_OFF --&gt;&lt;div class=\"md\"&gt;&lt;p&gt;I&amp;#39;m learning JS and was wondering if there is any reason to &lt;em&gt;ever&lt;/em&gt; use if statements instead of switch? &lt;/p&gt;\n\n&lt;p&gt;On an unrelated note, I think typing break; each time seems unnecessary; it should just be implied.&lt;/p&gt;\n\n&lt;p&gt;EDIT: Thanks for the responses, everyone.&lt;/p&gt;\n&lt;/div&gt;&lt;!-- SC_ON --&gt;",
          "selftext":"I'm learning JS and was wondering if there is any reason to *ever* use if statements instead of switch? \n\nOn an unrelated note, I think typing break; each time seems unnecessary; it should just be implied.\n\nEDIT: Thanks for the responses, everyone.",
          "likes":null,
          "secure_media":null,
          "link_flair_text":null,
          "id":"239aog",
          "gilded":0,
          "secure_media_embed":{

          },
          "clicked":false,
          "stickied":false,
          "author":"food_bag",
          "media":null,
          "score":0,
          "approved_by":null,
          "over_18":false,
          "hidden":false,
          "thumbnail":"",
          "subreddit_id":"t5_2qh30",
          "edited":1397751068,
          "link_flair_css_class":null,
          "author_flair_css_class":null,
          "downs":7,
          "saved":false,
          "is_self":true,
          "permalink":"/r/javascript/comments/239aog/what_is_the_point_of_if_statements_if_you_have/",
          "name":"t3_239aog",
          "created":1397757564,
          "url":"http://www.reddit.com/r/javascript/comments/239aog/what_is_the_point_of_if_statements_if_you_have/",
          "author_flair_text":null,
          "title":"What is the point of if statements if you have switch statements?",
          "created_utc":1397728764,
          "ups":6,
          "num_comments":17,
          "visited":false,
          "num_reports":null,
          "distinguished":null
        }
      },
      {
        "kind":"t3",
        "data":{
          "domain":"visjs.org",
          "banned_by":null,
          "media_embed":{

          },
          "subreddit":"javascript",
          "selftext_html":null,
          "selftext":"",
          "likes":null,
          "secure_media":null,
          "link_flair_text":null,
          "id":"236sue",
          "gilded":0,
          "secure_media_embed":{

          },
          "clicked":false,
          "stickied":false,
          "author":"skillcode",
          "media":null,
          "score":12,
          "approved_by":null,
          "over_18":false,
          "hidden":false,
          "thumbnail":"",
          "subreddit_id":"t5_2qh30",
          "edited":false,
          "link_flair_css_class":null,
          "author_flair_css_class":null,
          "downs":3,
          "saved":false,
          "is_self":false,
          "permalink":"/r/javascript/comments/236sue/visjs_dynamic_browser_based_visualization_library/",
          "name":"t3_236sue",
          "created":1397692025,
          "url":"http://visjs.org/",
          "author_flair_text":null,
          "title":"Vis.js - dynamic, browser based visualization library.",
          "created_utc":1397663225,
          "ups":15,
          "num_comments":2,
          "visited":false,
          "num_reports":null,
          "distinguished":null
        }
      },
      {
        "kind":"t3",
        "data":{
          "domain":"self.javascript",
          "banned_by":null,
          "media_embed":{

          },
          "subreddit":"javascript",
          "selftext_html":"&lt;!-- SC_OFF --&gt;&lt;div class=\"md\"&gt;&lt;p&gt;Greetings from Scotland &lt;/p&gt;\n\n&lt;p&gt;I&amp;#39;m looking for a small collection of individuals with Web Design skills to consult on a work from home virtual volunteering project. This is an ambitious project designed around creating a collaborative collective of volunteers, who will eventually work together to create and maintain websites for a number of small community charities in Glasgow. &lt;/p&gt;\n\n&lt;p&gt;In order to build this in a sustainable manner we are looking for volunteers eager to involve themselves in discussions of how such a group would operate, communicate and be managed so that we can design our structures around those doing the work. &lt;/p&gt;\n\n&lt;p&gt;It might be that this simply couldn&amp;#39;t work, but if a structure for collaborative off site volunteering could be tested and proven to work, the possibilities for such a project are endless. &lt;/p&gt;\n\n&lt;p&gt;If you&amp;#39;re interested in finding out more inbox me for more info &lt;/p&gt;\n\n&lt;p&gt;Renegade Hampster&lt;/p&gt;\n&lt;/div&gt;&lt;!-- SC_ON --&gt;",
          "selftext":"Greetings from Scotland \n\nI'm looking for a small collection of individuals with Web Design skills to consult on a work from home virtual volunteering project. This is an ambitious project designed around creating a collaborative collective of volunteers, who will eventually work together to create and maintain websites for a number of small community charities in Glasgow. \n\nIn order to build this in a sustainable manner we are looking for volunteers eager to involve themselves in discussions of how such a group would operate, communicate and be managed so that we can design our structures around those doing the work. \n\nIt might be that this simply couldn't work, but if a structure for collaborative off site volunteering could be tested and proven to work, the possibilities for such a project are endless. \n\nIf you're interested in finding out more inbox me for more info \n\nRenegade Hampster\n",
          "likes":null,
          "secure_media":null,
          "link_flair_text":null,
          "id":"239hb7",
          "gilded":0,
          "secure_media_embed":{

          },
          "clicked":false,
          "stickied":false,
          "author":"renegadehampster",
          "media":null,
          "score":0,
          "approved_by":null,
          "over_18":false,
          "hidden":false,
          "thumbnail":"",
          "subreddit_id":"t5_2qh30",
          "edited":1397746440,
          "link_flair_css_class":null,
          "author_flair_css_class":null,
          "downs":8,
          "saved":false,
          "is_self":true,
          "permalink":"/r/javascript/comments/239hb7/help_build_something_epic/",
          "name":"t3_239hb7",
          "created":1397765848,
          "url":"http://www.reddit.com/r/javascript/comments/239hb7/help_build_something_epic/",
          "author_flair_text":null,
          "title":"Help Build Something Epic",
          "created_utc":1397737048,
          "ups":3,
          "num_comments":0,
          "visited":false,
          "num_reports":null,
          "distinguished":null
        }
      },
      {
        "kind":"t3",
        "data":{
          "domain":"self.javascript",
          "banned_by":null,
          "media_embed":{

          },
          "subreddit":"javascript",
          "selftext_html":"&lt;!-- SC_OFF --&gt;&lt;div class=\"md\"&gt;&lt;p&gt;I am trying to use &lt;a href=\"http://www.socket.io\"&gt;www.socket.io&lt;/a&gt; room feature but I am having a hard time. Can anyone help me with understanding it and getting it started. I have already taken a look at their example and plenty others. Maybe some one has a better understanding and can explain it in the way they learned it or point me to a good resource they know of.&lt;/p&gt;\n&lt;/div&gt;&lt;!-- SC_ON --&gt;",
          "selftext":"I am trying to use www.socket.io room feature but I am having a hard time. Can anyone help me with understanding it and getting it started. I have already taken a look at their example and plenty others. Maybe some one has a better understanding and can explain it in the way they learned it or point me to a good resource they know of.",
          "likes":null,
          "secure_media":null,
          "link_flair_text":null,
          "id":"238fbz",
          "gilded":0,
          "secure_media_embed":{

          },
          "clicked":false,
          "stickied":false,
          "author":"inoabrian",
          "media":null,
          "score":0,
          "approved_by":null,
          "over_18":false,
          "hidden":false,
          "thumbnail":"",
          "subreddit_id":"t5_2qh30",
          "edited":1397699388,
          "link_flair_css_class":null,
          "author_flair_css_class":null,
          "downs":1,
          "saved":false,
          "is_self":true,
          "permalink":"/r/javascript/comments/238fbz/javascript_help_with_socketios_rooms/",
          "name":"t3_238fbz",
          "created":1397727644,
          "url":"http://www.reddit.com/r/javascript/comments/238fbz/javascript_help_with_socketios_rooms/",
          "author_flair_text":null,
          "title":"Javascript help with Socket.io's rooms.",
          "created_utc":1397698844,
          "ups":1,
          "num_comments":5,
          "visited":false,
          "num_reports":null,
          "distinguished":null
        }
      },
      {
        "kind":"t3",
        "data":{
          "domain":"keyholesoftware.com",
          "banned_by":null,
          "media_embed":{

          },
          "subreddit":"javascript",
          "selftext_html":null,
          "selftext":"",
          "likes":null,
          "secure_media":null,
          "link_flair_text":null,
          "id":"236sr6",
          "gilded":0,
          "secure_media_embed":{

          },
          "clicked":false,
          "stickied":false,
          "author":"KeyholeSoftware",
          "media":null,
          "score":5,
          "approved_by":null,
          "over_18":false,
          "hidden":false,
          "thumbnail":"",
          "subreddit_id":"t5_2qh30",
          "edited":false,
          "link_flair_css_class":null,
          "author_flair_css_class":null,
          "downs":6,
          "saved":false,
          "is_self":false,
          "permalink":"/r/javascript/comments/236sr6/tried_out_famous_with_a_poc_app_heres_what_we/",
          "name":"t3_236sr6",
          "created":1397691964,
          "url":"http://keyholesoftware.com/2014/04/14/famous-guitar-tuner/",
          "author_flair_text":null,
          "title":"Tried out Famo.us with a POC app - here's what we learned",
          "created_utc":1397663164,
          "ups":11,
          "num_comments":9,
          "visited":false,
          "num_reports":null,
          "distinguished":null
        }
      },
      {
        "kind":"t3",
        "data":{
          "domain":"self.javascript",
          "banned_by":null,
          "media_embed":{

          },
          "subreddit":"javascript",
          "selftext_html":"&lt;!-- SC_OFF --&gt;&lt;div class=\"md\"&gt;&lt;pre&gt;&lt;code&gt;function poop(x) {\n    return x + 1;\n}\n\nfunction testor(arr1, fun1) {\n    var newArray = new Array();\n    for(var i = 0; i &amp;lt; arr1.length; i++) {\n        a = fun1(arr1[i]);\n        newArray.push(a);\n    }\n    return newArray;\n}\n\ndocument.write([1,2,3,4,5], poop);\n&lt;/code&gt;&lt;/pre&gt;\n\n&lt;p&gt;Not sure why this code is showing an output of:&lt;/p&gt;\n\n&lt;pre&gt;&lt;code&gt;1,2,3,4,5function poop(x) { return x + 1; }\n&lt;/code&gt;&lt;/pre&gt;\n&lt;/div&gt;&lt;!-- SC_ON --&gt;",
          "selftext":"    function poop(x) {\n    \treturn x + 1;\n    }\n    \n    function testor(arr1, fun1) {\n    \tvar newArray = new Array();\n    \tfor(var i = 0; i &lt; arr1.length; i++) {\n    \t\ta = fun1(arr1[i]);\n    \t\tnewArray.push(a);\n    \t}\n    \treturn newArray;\n    }\n    \n    document.write([1,2,3,4,5], poop);\n\nNot sure why this code is showing an output of:\n\n    1,2,3,4,5function poop(x) { return x + 1; }",
          "likes":null,
          "secure_media":null,
          "link_flair_text":null,
          "id":"2388jw",
          "gilded":0,
          "secure_media_embed":{

          },
          "clicked":false,
          "stickied":false,
          "author":"freshaaron",
          "media":null,
          "score":0,
          "approved_by":null,
          "over_18":false,
          "hidden":false,
          "thumbnail":"",
          "subreddit_id":"t5_2qh30",
          "edited":false,
          "link_flair_css_class":null,
          "author_flair_css_class":null,
          "downs":3,
          "saved":false,
          "is_self":true,
          "permalink":"/r/javascript/comments/2388jw/help_with_code/",
          "name":"t3_2388jw",
          "created":1397723056,
          "url":"http://www.reddit.com/r/javascript/comments/2388jw/help_with_code/",
          "author_flair_text":null,
          "title":"Help with code?",
          "created_utc":1397694256,
          "ups":2,
          "num_comments":3,
          "visited":false,
          "num_reports":null,
          "distinguished":null
        }
      },
      {
        "kind":"t3",
        "data":{
          "domain":"frontendjournal.com",
          "banned_by":null,
          "media_embed":{

          },
          "subreddit":"javascript",
          "selftext_html":null,
          "selftext":"",
          "likes":null,
          "secure_media":null,
          "link_flair_text":null,
          "id":"237m95",
          "gilded":0,
          "secure_media_embed":{

          },
          "clicked":false,
          "stickied":false,
          "author":"rcoshiro",
          "media":null,
          "score":1,
          "approved_by":null,
          "over_18":false,
          "hidden":false,
          "thumbnail":"",
          "subreddit_id":"t5_2qh30",
          "edited":false,
          "link_flair_css_class":null,
          "author_flair_css_class":null,
          "downs":3,
          "saved":false,
          "is_self":false,
          "permalink":"/r/javascript/comments/237m95/how_to_build_an_asset_pipeline_with_gulp_js/",
          "name":"t3_237m95",
          "created":1397709376,
          "url":"http://www.frontendjournal.com/how-to-build-an-asset-pipeline-with-gulpjs-for-any-webapp/",
          "author_flair_text":null,
          "title":"How to build an Asset Pipeline with Gulp js",
          "created_utc":1397680576,
          "ups":4,
          "num_comments":2,
          "visited":false,
          "num_reports":null,
          "distinguished":null
        }
      },
      {
        "kind":"t3",
        "data":{
          "domain":"github.com",
          "banned_by":null,
          "media_embed":{

          },
          "subreddit":"javascript",
          "selftext_html":null,
          "selftext":"",
          "likes":null,
          "secure_media":null,
          "link_flair_text":null,
          "id":"237zso",
          "gilded":0,
          "secure_media_embed":{

          },
          "clicked":false,
          "stickied":false,
          "author":"roman01la",
          "media":null,
          "score":1,
          "approved_by":null,
          "over_18":false,
          "hidden":false,
          "thumbnail":"",
          "subreddit_id":"t5_2qh30",
          "edited":false,
          "link_flair_css_class":null,
          "author_flair_css_class":null,
          "downs":1,
          "saved":false,
          "is_self":false,
          "permalink":"/r/javascript/comments/237zso/development_build_test_deploy_processes_for/",
          "name":"t3_237zso",
          "created":1397717424,
          "url":"https://github.com/roman01la/develop-build-test-deploy",
          "author_flair_text":null,
          "title":"Development, build, test, deploy processes for full-stack JavaScript (Node.js) applications",
          "created_utc":1397688624,
          "ups":2,
          "num_comments":3,
          "visited":false,
          "num_reports":null,
          "distinguished":null
        }
      },
      {
        "kind":"t3",
        "data":{
          "domain":"self.javascript",
          "banned_by":null,
          "media_embed":{

          },
          "subreddit":"javascript",
          "selftext_html":"&lt;!-- SC_OFF --&gt;&lt;div class=\"md\"&gt;&lt;p&gt;My answer was that I tried to eliminate any library from my stack that had a characteristic that I had commonly seen among libraries that had failed in the past. Such as almost anything made by Microsoft, the slowness and verbosity of Enterprise super-platforms, or the &amp;quot;devil&amp;#39;s bargain&amp;quot; of companies that sell you documentation like Sencha or Adobe.&lt;/p&gt;\n\n&lt;p&gt;What is your answer, or what is a better way to phrase a response?&lt;/p&gt;\n&lt;/div&gt;&lt;!-- SC_ON --&gt;",
          "selftext":"My answer was that I tried to eliminate any library from my stack that had a characteristic that I had commonly seen among libraries that had failed in the past. Such as almost anything made by Microsoft, the slowness and verbosity of Enterprise super-platforms, or the \"devil's bargain\" of companies that sell you documentation like Sencha or Adobe.\n\nWhat is your answer, or what is a better way to phrase a response?",
          "likes":null,
          "secure_media":null,
          "link_flair_text":null,
          "id":"2378xo",
          "gilded":0,
          "secure_media_embed":{

          },
          "clicked":false,
          "stickied":false,
          "author":"bishopZ",
          "media":null,
          "score":2,
          "approved_by":null,
          "over_18":false,
          "hidden":false,
          "thumbnail":"",
          "subreddit_id":"t5_2qh30",
          "edited":false,
          "link_flair_css_class":null,
          "author_flair_css_class":null,
          "downs":3,
          "saved":false,
          "is_self":true,
          "permalink":"/r/javascript/comments/2378xo/the_best_frontend_interview_question_i_got_when/",
          "name":"t3_2378xo",
          "created":1397701717,
          "url":"http://www.reddit.com/r/javascript/comments/2378xo/the_best_frontend_interview_question_i_got_when/",
          "author_flair_text":null,
          "title":"The best frontend interview question I got: when evaluating javascript libraries, how do you know which are the ones that are good and will last, and which are bad and will die?",
          "created_utc":1397672917,
          "ups":5,
          "num_comments":7,
          "visited":false,
          "num_reports":null,
          "distinguished":null
        }
      },
      {
        "kind":"t3",
        "data":{
          "domain":"webtoolkit.info",
          "banned_by":null,
          "media_embed":{

          },
          "subreddit":"javascript",
          "selftext_html":null,
          "selftext":"",
          "likes":null,
          "secure_media":null,
          "link_flair_text":null,
          "id":"2362ob",
          "gilded":0,
          "secure_media_embed":{

          },
          "clicked":false,
          "stickied":false,
          "author":"yushulx",
          "media":null,
          "score":11,
          "approved_by":null,
          "over_18":false,
          "hidden":false,
          "thumbnail":"",
          "subreddit_id":"t5_2qh30",
          "edited":false,
          "link_flair_css_class":null,
          "author_flair_css_class":null,
          "downs":10,
          "saved":false,
          "is_self":false,
          "permalink":"/r/javascript/comments/2362ob/javascript_utf8/",
          "name":"t3_2362ob",
          "created":1397668237,
          "url":"http://www.webtoolkit.info/javascript-utf8.html#.U05IKBCSw-R",
          "author_flair_text":null,
          "title":"JavaScript UTF-8",
          "created_utc":1397639437,
          "ups":21,
          "num_comments":7,
          "visited":false,
          "num_reports":null,
          "distinguished":null
        }
      },
      {
        "kind":"t3",
        "data":{
          "domain":"self.javascript",
          "banned_by":null,
          "media_embed":{

          },
          "subreddit":"javascript",
          "selftext_html":"&lt;!-- SC_OFF --&gt;&lt;div class=\"md\"&gt;&lt;p&gt;Anyone else getting started want to meet up, connect, and learn programming together?&lt;/p&gt;\n\n&lt;p&gt;I&amp;#39;m down to meet in SF or in the Peninsula as far as Mountain View.&lt;/p&gt;\n\n&lt;p&gt;PS I tried posting this previously in &lt;a href=\"/r/learnjavascript\"&gt;/r/learnjavascript&lt;/a&gt; and &lt;a href=\"/r/learnprogramming\"&gt;/r/learnprogramming&lt;/a&gt; with no luck so I hope posting here is okay.&lt;/p&gt;\n&lt;/div&gt;&lt;!-- SC_ON --&gt;",
          "selftext":"Anyone else getting started want to meet up, connect, and learn programming together?\n\nI'm down to meet in SF or in the Peninsula as far as Mountain View.\n\nPS I tried posting this previously in /r/learnjavascript and /r/learnprogramming with no luck so I hope posting here is okay.",
          "likes":null,
          "secure_media":null,
          "link_flair_text":null,
          "id":"237q36",
          "gilded":0,
          "secure_media_embed":{

          },
          "clicked":false,
          "stickied":false,
          "author":"PopcornTimer",
          "media":null,
          "score":0,
          "approved_by":null,
          "over_18":false,
          "hidden":false,
          "thumbnail":"",
          "subreddit_id":"t5_2qh30",
          "edited":false,
          "link_flair_css_class":null,
          "author_flair_css_class":null,
          "downs":2,
          "saved":false,
          "is_self":true,
          "permalink":"/r/javascript/comments/237q36/looking_for_coding_buddy_to_learn_programming/",
          "name":"t3_237q36",
          "created":1397711572,
          "url":"http://www.reddit.com/r/javascript/comments/237q36/looking_for_coding_buddy_to_learn_programming/",
          "author_flair_text":null,
          "title":"Looking for coding buddy to learn programming together in SF Bay Area",
          "created_utc":1397682772,
          "ups":1,
          "num_comments":0,
          "visited":false,
          "num_reports":null,
          "distinguished":null
        }
      },
      {
        "kind":"t3",
        "data":{
          "domain":"theresassoundworld.com",
          "banned_by":null,
          "media_embed":{

          },
          "subreddit":"javascript",
          "selftext_html":null,
          "selftext":"",
          "likes":null,
          "secure_media":null,
          "link_flair_text":null,
          "id":"237kdh",
          "gilded":0,
          "secure_media_embed":{

          },
          "clicked":false,
          "stickied":false,
          "author":"stuartmemo",
          "media":null,
          "score":0,
          "approved_by":null,
          "over_18":false,
          "hidden":false,
          "thumbnail":"",
          "subreddit_id":"t5_2qh30",
          "edited":false,
          "link_flair_css_class":null,
          "author_flair_css_class":null,
          "downs":2,
          "saved":false,
          "is_self":false,
          "permalink":"/r/javascript/comments/237kdh/theresas_sound_world_a_web_audio_library_for_now/",
          "name":"t3_237kdh",
          "created":1397708293,
          "url":"http://theresassoundworld.com",
          "author_flair_text":null,
          "title":"Theresa's Sound World - a web audio library for now people",
          "created_utc":1397679493,
          "ups":1,
          "num_comments":1,
          "visited":false,
          "num_reports":null,
          "distinguished":null
        }
      },
      {
        "kind":"t3",
        "data":{
          "domain":"self.javascript",
          "banned_by":null,
          "media_embed":{

          },
          "subreddit":"javascript",
          "selftext_html":"&lt;!-- SC_OFF --&gt;&lt;div class=\"md\"&gt;&lt;p&gt;Hey all,&lt;/p&gt;\n\n&lt;p&gt;I&amp;#39;m basically trying to evaluate whether the method of a class exists based on a string. eval() seems like an easy way to do it, but I&amp;#39;ve learned that it&amp;#39;s both evil and deprecated.&lt;/p&gt;\n\n&lt;p&gt;Here&amp;#39;s my code:&lt;/p&gt;\n\n&lt;pre&gt;&lt;code&gt;var class = &amp;#39;Foo&amp;#39;;\nvar param = &amp;#39;bar&amp;#39;;\nvar method = &amp;#39;baz&amp;#39;;\nvar methodParam = &amp;#39;qux&amp;#39;;\n\nfunction Factory(){}\n\nFactory.prototype.make = function(class, params){\n    //THIS I GOT FIGURED OUT\n    return window[class](params);\n};\n\nfunction Model(param){\n    this.param = param;\n\n    this.baz = function(param){\n        alert(&amp;#39;baz&amp;#39;);\n    };\n}\n\nModel.prototype.hasMethod = function(methodString){\n    //THIS IS WRONG.\n    if(typeof this.methodName === &amp;quot;function&amp;quot;) return true;\n    return false;\n};\n\nfactory = new Factory();\nmyModel = factory.make(class, param);\n\nif(myModel.prototype.hasMethod(method)){\n    //AND THIS IS WRONG.\n    myModel.method(methodParam);\n}\n&lt;/code&gt;&lt;/pre&gt;\n\n&lt;p&gt;In the PHP world this is pretty easy I can do ( sans logic / factory above ):&lt;/p&gt;\n\n&lt;pre&gt;&lt;code&gt;$class = &amp;#39;Foo&amp;#39;;\n$param = &amp;#39;bar&amp;#39;\n$method = &amp;#39;Baz&amp;#39;;\n$methodParam = &amp;#39;qux&amp;#39;;\n\n$myObject = new $class($param);\n$myObject-&amp;gt;$method($methodParam);\n&lt;/code&gt;&lt;/pre&gt;\n&lt;/div&gt;&lt;!-- SC_ON --&gt;",
          "selftext":"Hey all,\n\nI'm basically trying to evaluate whether the method of a class exists based on a string. eval() seems like an easy way to do it, but I've learned that it's both evil and deprecated.\n\nHere's my code:\n\n\tvar class = 'Foo';\n\tvar param = 'bar';\n\tvar method = 'baz';\n\tvar methodParam = 'qux';\n\t\n\tfunction Factory(){}\n\t\n\tFactory.prototype.make = function(class, params){\n\t\t//THIS I GOT FIGURED OUT\n\t\treturn window[class](params);\n\t};\n\t\n\tfunction Model(param){\n\t\tthis.param = param;\n\t\n\t\tthis.baz = function(param){\n\t\t\talert('baz');\n\t\t};\n\t}\n\t\n\tModel.prototype.hasMethod = function(methodString){\n\t\t//THIS IS WRONG.\n\t\tif(typeof this.methodName === \"function\") return true;\n\t\treturn false;\n\t};\n\t\n\tfactory = new Factory();\n\tmyModel = factory.make(class, param);\n\t\n\tif(myModel.prototype.hasMethod(method)){\n\t\t//AND THIS IS WRONG.\n\t\tmyModel.method(methodParam);\n\t}\n\nIn the PHP world this is pretty easy I can do ( sans logic / factory above ):\n\n    $class = 'Foo';\n    $param = 'bar'\n    $method = 'Baz';\n    $methodParam = 'qux';\n\n    $myObject = new $class($param);\n    $myObject-&gt;$method($methodParam);",
          "likes":null,
          "secure_media":null,
          "link_flair_text":null,
          "id":"237h96",
          "gilded":0,
          "secure_media_embed":{

          },
          "clicked":false,
          "stickied":false,
          "author":"s3gfau1t",
          "media":null,
          "score":0,
          "approved_by":null,
          "over_18":false,
          "hidden":false,
          "thumbnail":"",
          "subreddit_id":"t5_2qh30",
          "edited":false,
          "link_flair_css_class":null,
          "author_flair_css_class":null,
          "downs":1,
          "saved":false,
          "is_self":true,
          "permalink":"/r/javascript/comments/237h96/long_time_backend_dev_looking_for_some_help/",
          "name":"t3_237h96",
          "created":1397706506,
          "url":"http://www.reddit.com/r/javascript/comments/237h96/long_time_backend_dev_looking_for_some_help/",
          "author_flair_text":null,
          "title":"Long time backend dev looking for some help honing my JS skills",
          "created_utc":1397677706,
          "ups":1,
          "num_comments":12,
          "visited":false,
          "num_reports":null,
          "distinguished":null
        }
      }
    ],
    "after":"t3_237h96",
    "before":null
  }
}