Workisfun, Programatically,.

 
Ringdahl: If I wannamake a variable global i DONT declare it with var

Stuchlik: Tcsc: right, any reason to not just put them all in the original declaration ?

Rivara: It wouldn’t matter for a collision grid since you wont have many of them

Stuchlik: Oh right, interesting

Packingham: But putting them in the declaration will use more memory per instance and cause the constructor to be slower.

Tavolario: Its also just the common convention.

Pexsa: Django_, Yes. However, there are better ways to do it, such as explicitly declaring a property on window.

Pexsa: Django_, Always try to avoid globals though.

Tomisin: Pexsa: yeah but im doing it with an array

Marcussen: I know i know i need this to be a global though 😀

Culmer: If I have a function where i do something to a variable and i wanna use it in another function, what can i do?

Pexsa: Django_, Inject the variable into both functions from a higher scope.

Pexsa: Django_, Just use a proper higher scope other than global, so that you don’t litter.

Belsky: I’m using some library called webdriverio, which uses a lot of async and promises. And I’m lost in a bit of a callback hell.

Remy: Specifically for a for . { loop that requires checking for a value async and adding it if not async

Kopera: And keeping that in line with all the rest of the process

Stuchlik: Tcsc: that ***ERT – is a custom function I’m guessing?

Belmonte: It basically is a debugging function that opens a debugger if that condition is false in debug builds, and vanishes in release builds

Pexsa: Ajf-, Are you polling via for loop?

Stuchlik: Tcsc: yeah, sounds similar to the python ***ert

Stuchlik: Tried to find docs on it 😛

Garzia: Pexsa: sorry not familiar with polling

Navejar: Here’s a small fragment of the code https://gist.github.com/ajf-/29e63b50cd8b1fa2a746

Pexsa: Ajf-, Does your loop run continuously, checking for the response and exiting when it gets it?

Mcvey: If i have var x =’#abc’ how can i remove #

Sossong: Baxx: sorry, considered getting rid of it but thought knowing the conditions the code expects to be true could help you out

Falls: I coded it so it executes all the loops asynchronously

Malec: But then I am struggling to see if I should add those promises to a Promise.all array instead

Stuchlik: Tcsc: no that’s cool – makes sense

Pexsa: Ajf-, Hrm. I’m afraid I’m not qualified to give you an answer, not having had a chance to really use promises myself.

Corbin: Var fruits = “#Banana”, “#Orange”, “#Lemon”, “#Apple”, “#Mango”;

Chaton: How can i remove the#

Detommaso: How can I know what is responsible for adding a style attribute to an element

Allaire: Pexsa:how would i try to get a reference to the handler?

Usman: Django_: if you have an array of strings, jsonData, jsonDatai.split/s+/ absolutely does split it

Riback: Usman: yeah i got the split to work

Usman: Django_: are you *doing* anything with the returned split value? split doesn’t do anything inline you know

Usman: Django_: and then .split.sort? no clue what you are expecting to happen there

Gabri: Usman: all of that has been fixed

Mclin: I need to remove character from string

Stuchlik: Tcsc: ***ERTx width * cellSize —- Seems like it will *always* be true? http://vpaste.net/XwS99

Cardone: Var fruits = “#Banana”, “#Orange”, “#Lemon”, “#Apple”, “#Mango”;

Wakley: Django_: String.prototype.replace – JavaScript MDN https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace

Pexsa: Workisfun, Programatically, I don’t think you can. By hand, you might be able to find the handler in the debugger, break in it, and save a reference somewhere.