Macdiarmid: Profsimm: you’ll probably find the answer here: http://www.ecma-international.org/ecma-262/6.0/#sec-ordinary-object-internal-methods-and-internal-slots-set-p-v-receiver
Kribbs: Rcyr: I do use strict mode, but in the console I wasn’t for obvious reasons.
Duncans: That’s what I will say on my email which looks very attractive
Torrillo: But again, getters/setters are really weird. And they work in completely different ways from Data properties.
Shiffer: Rcyr: btw how does one turn on strict mode in the console
Lourenco: Profsimm: I have no idea. I’d probably try: function { ‘use strict’; code here }
Laurenceau: Rcyr: good point. Thanks!
Sarazin: Js function { ‘use strict’; var x = Object.createObject.prototype, { foo: { get: function { return 42; } }}; x.foo = 20; }
Wakley: Rcyr: TypeError: setting a property that has only a getter
Keib: Js function { var x = Object.createObject.prototype, { foo: { get: function { return 42; } }}; x.foo = 20; }
Rahoche: Rcyr: it throws type error in strict mode! Perfect
Mesich: Rcyr: god damn, the default behavior is just dumb.
Poort: Profsimm: s/dumb/to be backward compatible.
Skoog: I’m impressed, Javascript can do FizzBuzz in 3 lines
Creeley: Inside a loop, console.logi % 5 === 0 && i % 3 === 0 ? “FizzBuzz” : i % 5 === 0 ? “Fizz” : i % 3 === 0 ? “Buzz” : i;
Lynd: Profsimm: keep in mind that anything added to JavaScript can’t break existing programs.
Halbershtam: Rcyr: were really setters present before strict mode?
Reaney: Profsimm: “strict mode” is a “I want my program to break” mode
Casdorph: And yes, getters/setters were added ages ago, in SpiderMonkey, much before strict mode was a thing
Pongkhamsing: Frogdr: why do it in 3 lines when you can do it in 50? 😛 https://gist.github.com/robotlolita/eea36446066486903bff
Lieb: Wonder what would happen if programmers were paid by lines-of-code, like writers…
Navorro: Or a thousand. https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition :
Skjei: Dekok: Much more COBOL.NET
Geise: Rcyr: you had to remember people of that :
Wakley: Havvy: Enterprise: on a continuing mission to explore strange new worlds, to seek out new life and civilizations, and to boldly go where no one has gone before
Fansler: Havvy: in this case, not going there is a good thing 😛
Dannecker: Hello. Stupid question. I have a gulp task – gulp.task’bumpMajor’, bumpMajor
Derksen: And similair bumpMinor.
Scoresby: Wait do you not need semicolons in JS
Levielle: How to p*** a variable with callback?
Wakley: Havvy: ASI stands for ‘automatic semicolon insertion’, a mechanism by which semicolons may be omitted from the source code in certain cases, and still be recognized by the p****r. For details: http://Spuler.org/~Spuler/blog/javascript_semicolons – for fewer details and a commonly-held opinion, see http://goo.gl/QEYT4g
Lamott: Leporello: Using a extra closure or .bind
Dais: Leporello: Use a function expression: gulp.task”bumpMajor”, function { return bumpMajorarg; }
Kohs: I want to have only bump function with args like major, minor and patch
Vellone: Gulp.task’bumpMajor’, bump.bind’major’ will work?
Wakley: Jolo248: For help, ask your question. Be patient. Code samples should be pasted in a paste service see !paste. Tell us 1 what you want to happen, 2 what is actually happening, and 3 any error messages you find see !describe and !debug.
Montpetit: Leporello: function bumpwhat{ return functionother, args{ return blah }}; gulp.task’bumpMajor’, bump’major’
Haglund: Dekok, really. I was close :
Thorin: Dekok: regarding your comments, it’s time to realize JS is not 90s JS. Some of the things you can do in JS aren’t that good in practice. So don’t be surprised to find new features don’t align with a culture of monkey-patching an untyped mess.