I quite often see JavaScript with variables that start with a dollar sign. When/why would you choose to prefix a variable in this way?  (I'm not asking about $('p.foo') syntax that you see in jQuery and others, but normal variables like...
Are there any standard ways of marking a function argument as unused in JavaScript, analogous to starting a method argument with an underscore in Ruby?...
Let's say I have a function in a view that triggers when some kind of state is changed. What would be best to name it and why?   stateChange stateChanged onStateChange onStateChanged...
I am using ASP.Net to serialize classes designed in C# to JSON. My Javascript application then requests those objects with AJAX. I have done this on a couple of projects now, but I run into the problem that the C# standard naming conventions use Pasc...
I'm wondering if is there a naming convention to namespacing events with AngularJS?  jQuery defines its convention as event.namespace (with namespace at the end, and dot separator)  I've seen some articles (example) where events are named lik...
Context  I read a JavaScript code example written by Google. It used:   Single lowercase letters for naming variables Single uppercase letters for naming functions   So the code was illegible.  Questions   Why this naming? What tools are using to do...
I'm adopting a large mish-mash of Javascript / jQuery code. I'd like to move it to Backbone.js but as an intermediary, I'm trying to namespace it so that it is sligthtly more modular.  I am wondering if there is a standard for namespaces...
Should files be named something-with-hyphens.js, camelCased.js, or something else?  I didn't find the answer to this question here....
I've been re-reading Spencer Tipping's excellent Javascript in Ten Minutes and for the life of me can't figure out what is going on in this example of using lazy scoping to create syntactic macros:  var f = function () {return $0 + $1};...
Is there a convention for naming mutable and predicate functions in Javascript?  For example, in Ruby, Lisp, etc., functions that mutate their contents, like gsub!, usually have an exclamation point as a convention to denote that the function is dang...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.