es6 (1,968)


Is there a “concise” way to do namespacing in JavaScript?

Is there a “concise” way to do namespacing in JavaScript?

I've frequently encountered sites that put all of their javascript inside a "namespace" structure along the lines of namespaces={ com:{ example:{example.com's data}}But setting this up safely…


How to provide namespaces in JavaScript with instanced objects

I've got a JavaScript "object", built this way: function foo(){this.length=0;}foo.prototype.getLength=function(){return this.length;}... I know how to emulate namespaces with si…


What Are Some Examples of Design Pattern Implementations Using JavaScript?

I'm a moderately skilled programmer using JavaScript but I am no guru. I know you can do some pretty powerful things with it, I just haven't seen much other than fairly basic DOM manipulation. I'm wo…


Reserved keywords in JavaScript

What JavaScript keywords(function names, variables, etc) are reserved?…



functional programming - What is 'Currying'?

I've seen references to curried functions in several articles and blogs but I can't find a good explanation(or at least one that makes sense!)…


functional programming - What is a 'Closure'?

I asked a question about Currying and closures were mentioned. What is a closure? How does it relate to currying?…


JavaScript private methods

To make a JavaScript class with a public method I'd do something like: function Restaurant(){} Restaurant.prototype.buy_food=function(){// something here}Restaurant.prototype.use_restroom=…


Javascript syntax highlighting in vim

Has anyone else found VIM's syntax highlighting of Javascript sub-optimal? I'm finding that sometimes I need to scroll around in order to get the syntax highlighting adjusted, as sometimes it mysteri…


Why was the arguments.callee.caller property deprecated in JavaScript?

Why was the arguments.callee.caller property deprecated in JavaScript? It was added and then deprecated in JavaScript, but it was omitted altogether by ECMAScript. Some browser(Mozilla, IE) have alw…


Is JavaScript object-oriented?

There have been some questions about whether or not JavaScript is an object-oriented language. Even a statement, "just because a language has objects doesn't make it OO." Is JavaScript an object-orien…




javascript object function class array typescript node example use how