discord's main target was voice when playing games
the chat aspect was just low hanging fruit i think
although people are doing interesting things with it, like i've been getting back into wow and it seems the main sources of raiding information are now discord channels
twitter seems like a bunch of garbage statements. Very little context and not very much thought. for financial markets indication, you might want to focus on statistics and not so much twitter or opinions.
@ex080 in other languages you can build libraries and just pull things you need from them to make code cleaner and simpler... however as far as i can see java-script doesn't just have a "include" function for browsers.
Can two people with experience unit testing do me a favor? I answered the OP's question and even created a pull request implementing the solution but never got a response and the bounty is about to expire. If it looks good will you upvote? If I can get two upvotes in the next hour at least I'll get half the bounty
I'm wondering if there's a tool I can use that checks html for certain things before deploying, such as all images have alt tags, there is schema on every page, no html errors, have robots.txt, etc...
I just want to make sure I'm not wrong here, please correct me if I am. Is the function value returned by an enclosing function called closure or the enclosing function itself? (I believe the inner function is the closure since it's the one that closes(freezes) the local variables of its wrapping function)
I understand the concept of closure, I just want to know which one is the one called closure.
not a native either ;) . Anyway the "freeze" word doesn't seem right to me. I hope you don't mean "it keeps some xerox copy of the variables". The local variables of the wrapping function can be changed by other means than inside the inner function.
But yeah, closure means basically that the inner function "keeps a reference" to the wrapping function's variable, if they are used in the inner function.
@Narnia It's worth saying that the variable isn't frozen, one of the biggest powers of a closure is that the inner function can read and modify variables from outside of the scope
function makeCounter() {
let i = 0;
return function() {
return i++; // returns i from the outside, and then increase it
}
}
const counter = makeCounter();
console.log(counter()); // 0
console.log(counter()); // 1
console.log(counter()); // 2
// ...
counter in this case is the internal function returned from makeCounter, and the numbers you get is the same i, increasing every time you call counter().
in React, I have this configuration: <input onChange={this.setPath(this.value)}/> but I get undefined because this refers to the app class parenting it. I would like to pass the value of the input tag as a parameter to its onChange callback, I couldn't work out how to word it simply enough so Mr. Google would understand, maybe someone here can help?
in React, I have this configuration: <input onChange={this.setPath(this.value)}/> but I get undefined because this refers to the app class parenting it. I would like to pass the value of the input tag as a parameter to its onChange callback, I couldn't work out how to word it simply enough so Mr. Google would understand, maybe someone here can help?
Can I get an opinion on this function? I want to generate a tree by calling this function starting with an empty object for tree and repeatedly calling it with a whole bunch of paths (arrays of strings) but I'm not certain it always works:
Does Javascript pass by references or pass by values? Here is an example from Javascript: The Good Parts. I am very confused about my parameter for the rectangle function. It is actually undefined, and redefined inside the function. There are no original reference. If I remove it from the functio...