[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip / qa] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


Visualized
>>
sir thank you for demonstration i have been confuse about this topic for 10 years but you clear it up instantly vishnu's blessings upon your mother
>>
>>101196108
Glad to help
>>
>>101196094
>find
useless
>findIndex, IndexOf
why 2?
>>
>>101196340
findIndex takes a truth test function, indexOf takes a value
>>
>>101196094
The find functions should return 0, there are no blue square faces. NOT going to make it.
>>
>>101196340
>useless
It's just shorthand for .filter(...)[0]. It's arguably useful. More clear in the code.
>why 2?
That example sucks. FindIndex takes a predicate rather than a value.
>>
what the fuckk is .reduce supposed to demonstrate
>>
>>101196406
the only thing the pic explains is that it's creator has no idea what these things actually do
>>
>>101196406
fucking retard it does have that in that row, but there are no blue spare in findIndex and indexof.
>>
>>101196417
reduce is useless anyway just use a loop
>>
can't believe anyone needs more than 2 seconds to understand this shit
it's so obvious and easy
if you struggled to understand it you are a moron and should stay away from computers from now until forever
>>
>>101197374
shut the fuck up FP tranny I make more money then you making Vue crud apps and never need this gay function shit pushed by Reactroons like you
>>
>>101197374
Saar, calm down. Your reputation on Microsoft help forum will take a hit.
>>
>>101196425
>he hasn't written a parallelized reduction function that outperforms loops by a factor of 3 in large datasets
>>
>>101196094
i didn't know the map function existed. even if you were shitposting, thanks anon.
>>
>>101197374
Zoomer and jeets need to replace you.
>>
ok so sure
map is understandable
so is filter
so it find
findIndex doesn't make sense (find blue square, returns the index of a purple square)
indexof is the same
no idea what reduce is supposed to do
>>
>>101197876

>no idea what reduce is supposed to do
OP's image does a poor job of explaining it. The reduce function is meant to produce an aggregate value over a list. So for instance, you could use it to calculate the sum or average of a list of numbers, or if you had a list of strings, you could concatenate all of the strings.

The image describes the accumulation function as "acc + curr", suggesting that we are summing all of the square faces together. Only problem is, summing them wouldn't really produce a rotated effect like that.
>>
>>101197713
>>101197827
>>101197855
genuine SEETHING from inferior tech illiterates
>>
>>101197849
You're welcome, bro
>>
File: cooldesu.png (27 KB, 655x189)
27 KB
27 KB PNG
>>
>>101196094
It's dumb and not even correct.

.find() and .findIndex() should be called with the white square (a function) not the blue square (an element)
>>
File: IMG_1869.jpg (237 KB, 1170x1218)
237 KB
237 KB JPG
>>101196094
someone please post the american version. this is too confusing
.
nvm ill just post it myself
>>
>>101196094
>indexof() returns 3 for third element
uhhh sars???
>>
>>101196094
>Rob Pike
>Oct 27, 2012, 10:08:49PM
>to Jackie Li, Thomas Bushnell, BSG, Christoph Hack, luz...@gmail.com, golang-nuts, bryanturley, Herbert Fischer
>Syntax highlighting is juvenile. When I was a child, I was taught arithmetic using colored rods (http://en.wikipedia.org/wiki/Cuisenaire_rods). I grew up and today I use monochromatic numerals.
>-rob
>>
>>101198669
>posting that in greentext
Ironic.
>>
>>101196417
>what the fuckk is .reduce supposed to demonstrate
how to take an array of various female body parts/hormones, a grown male adult, and append the female body parts to the male to make him a woman

[estrogen, silicon].reduce((chud, item) => chud + item, chud)


hope this helped
>>
>>>101198719
>>posting that in greentext
>Ironic
Irony is lost on children.
>>
>>101198669
meanwhile his language has a cartoon gopher as a mascot
>>
>>101196094
where's the Rotate?
>>
File: portraitpony.jpg (176 KB, 580x683)
176 KB
176 KB JPG
>>101199941
Yeah but that's his wife's drawings so it's understandable.



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.