When you wrap your JavaScript code in a function like this:  (function(){    var field = ...;   function doSomthing(){...   ...   })();   I noticed that this fixes scoping problems for me on a lot of web pages. What is this practice called?...
Just because functions are first class objects, there are closures, and higher order functions, does Javascript deserve to be called a Functional Programming language?  The main thing I think it lacks is Pure Functions, and it doesn't 'feel&#...
I asked this question earlier, and after thinking about the topic some more, I began to wonder where the seemingly fuzzy boundary between the meanings of the terms "statement" and "expression" lies.  Are all statements also expression...
In the learningwebgl tutorial1 I've found an interesting line in the fragment shader.  precision mediump float;   I've found an article about it here, but I still can't understand what does it mean?  And if I remove this line, nothing cha...
The book Learning JavaScript defines anonymous functions as follows...     Functions are objects. As such, you can create them - just like a String or Array or other type - by using a constructor and assigning the function to a variable. In the follo...
When teaching, it helps to have a common set of terms to describe categories of things to facilitate comprehension. Before let and const, I could just call var, "the var keyword"...   Now we have 3 keywords that are used to declare a variable...
I'm looking for a term for simple objects that emphasizes their simplicity.  Specifically, objects that are free of self-reference, and contain no methods, bindings, etc (i.e. JSON-serializable).  Right now I use words like:   "flat object...
I looked through the suggested links but can't seem to find the term for a function that acts like a class (is it a constructor function? doesn't have that keyword either!) but doesn't use the new keyword, nor class.   I've used both...
I'm having a hard time trying to find the right term for a function like:  var array = [1, 2, 3];  array.pop();  return array; // returns [1, 2];   And:  var array = [1, 2, 3].pop();  return array; // returns 3   I personally just call the first...
I quite often see on the Internet various complaints that other peoples examples of currying are not currying, but are actually just partial application.  I've not found a decent explanation of what partial application is, or how it differs from...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.