Comments (3)
There are a number of ways to declare functions in JavaScript, but some are better than others. And the worst way looks a lot like a standard function declaration in many other languages.
I've taught JavaScript to quite a few programmers, and this has led me to believe that this is not a "trivial skill" (though I agree that it is a basic one). To my mind, outlining the options and explaining their advantages and disadvantages provides, to paraphrase, "reusable solutions to common problems".
from javascript-patterns.
@noamkfir seems this pattern is named by you, i cannot find it in a couple of books which is talking about JS Pattern :(
from javascript-patterns.
@chapgaga I did not create the pattern and I did not name it. But I do agree with it, for the reasons I mentioned above.
Design patterns are descriptions of reusable solutions to common problems. The description on this page fits that definition, as far as I can see.
There are many patterns that are described in only one book or by just one source. That is not an argument against them. For example, Martin Fowler describes many patterns in his books and on his site, quite a few of which are probably not mentioned elsewhere, and most of which had not been mentioned anywhere before Fowler came along and cataloged them. That does not make them any less valuable.
from javascript-patterns.
Related Issues (20)
- Better jQuery Pattern Append HOT 1
- Page doesn't work well on low resolutions HOT 1
- Patterns not consistently used
- Namespace
- Un-responsive design makes content unusable on smaller screens HOT 2
- String concatenation => Better jQuery Pattern Append
- #5
- #1#
- When this conditional expression can be better than anything else?
- Get a maintainer HOT 3
- Count down to zero HOT 1
- about self-defining-functions,some issuse not sure
- Define "trickyness" in for-loop pattern HOT 3
- Maintain this repository HOT 14
- New method declaration convention
- Function declarations -- antipattern? HOT 2
- switch pattern indents `case`; breaks its rule #1
- Fixed position nav overlays content HOT 1
- There is no such method in jQuery
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from javascript-patterns.