Var obj = {myProp: test ===.

Macrowski: Oh, seems like I can if I do !important on .ace_editor

Macrowski: They use an inline style

Kempisty: I’m kinda new to coding been scripting for forever, but haven’t “coded” since some C cl***es back in 2000.

Moldenhauer: I’m trying to do Google Apps Script mostly javascript. but I need to use some code in two different functions, is there any way to call that snippet of code without having to have it in there tgwice?

Chauhdrey: JollyRgrs, make a third function that the other two call.

Hense: It defines ~25 vars, so I’d rather not have to keep p***ing all that data back and forth

Hovenga: I was orig. thinking function, but is there a way around that?

Chauhdrey: Why would you avoid a function?

Baranski: Third function would be ideal, but without having to p*** around the vars

Chauhdrey: Pastebin would help a lot

Lundell: Macrowski: hold on, one moment

Chauhdrey: JollyRgrs, Make an object that has all the values on it and have the functions just move that one object around

Radke: Http://

Macrowski: That’s definitly a cas of WET

Macrowski: Why do you need them in variables to begin with?

Chauhdrey: DRY stands for Don’t Repeat Yourself

Northrop: I dunno, again, i’ve not been programming in a long time, and it was only intro stuff

Chauhdrey: If you’re doing the same code in multiple places, it’s not DRY

Uresti: So, yeah, exactly what i’m trying to avoid

Strassberg: I’m doing a bunch of string replaces in do***ents and these are the values I will be using to replace

Kreighbaum: But depending on the function, it will be a diff set of do***ents, etc

Macrowski: JollyRgrs, can you post a minimal example of it working? Try jsfiddle.ney

Macrowski: Try abstracting the problem from your actual code into a reproducible example, that’ would us, and you, most often than not you find a solution just by doing this process

Cavaluzzi: Macrowski: yes, but this ****s. i just got called away family needs. I’ll have to pop back on later tonight or later on. I can just post the whole code if I need to, it is just a simple google apps script thing I’m trying to work on for my father’s biz

Goldrup: Macrowski: i’ll get to that later on. Thanks for looking at it, you too riobe

Macrowski: Come back later when you got some time, this channel is always alive

Pipher: Sorry to have to jet so soon after asking for help

Kikuchi: I was stupid for not lookign for this I only looked for help in a Google Apps SCript support before

Fournier: How do I iterate over an objects values with a for loop?

Schmeer: Rubyronin for loop can’t iterate over objects, you need for for-in loop

Amanza: Rubyronin

Maslak: Kearby: thank you very much

Hollon: Anyone work with amazon api

Cruze: Hi, can you recommend me a not too long book or article on how to structure code? I never know where to put my variables and where my functions. For good readability and scope.

Provenzo: Especially on smaller projects where I don’t separate files

Heyer: So is there a shorthand for conditional property ***ignment when doing object literals?

Morgenthaler: Z1mme: conditional property ***ignments? do you mean like a ternary?

Weyant: Var obj.something = condition ? primary : elseState;

Hamid: Austincheney: like I only want the validated property on an object if the source of it is true or false but if it’s undefined I don’t want it

Pellam: But is there a short hand to doing it when doing the construction of the object

Skees: Return { foo: bar, omg: lol } only add omg to object if lol isn’t undefined

Purvines: Var obj = {myProp: test === something};