12

I just saw this question closed as a duplicate. Which is fine, except that it is very difficult to find the one it's a dupe of if you don't know what you're searching for.

I actually answered an almost identical question a while ago, because I didn't find the duplicate either. Google doesn't help much unless you already know that the () => construct is called an 'arrow function'.

If even an experienced Stack Overflow user can't find the answer via searching then we are going to keep getting this 'what does => mean in JavaScript' question over and over again. How can we make info easier to find for users who don't know the name? Or just wait for it to go away as ECMAScript 2015 becomes more commonplace?

10
  • 7
    One of the problems is that symbol search on SE sites is broken. meta.stackoverflow.com/questions/289671/…
    – rene
    Commented Apr 7, 2016 at 21:11
  • 14
    Another one of the problems is that symbol search is broken on Google too. Commented Apr 7, 2016 at 21:13
  • 1
    Yeah that kinda makes it difficult. Commented Apr 7, 2016 at 21:14
  • @FrédéricHamidi It's not broken in any way, it just works different than you might expect.
    – IS4
    Commented Apr 8, 2016 at 14:29
  • 2
    @IllidanS4 Care to enlighten us? How can one search on Google for an operator whose name they don't know?
    – Siguza
    Commented Apr 8, 2016 at 14:36
  • 1
    @Siguza Maybe search "list of operators"?
    – IS4
    Commented Apr 8, 2016 at 14:52
  • @IllidanS4 Well, that doesn't really help for languages which have lots of them, such as Perl or bash.
    – Siguza
    Commented Apr 8, 2016 at 14:59
  • It may not always have the best results in terms of relevancy, but I like this site for searching up symbols in various languages: symbolhound.com/?q=javascript+%3D%3E - though admittedly in this case it's not much help Commented Apr 10, 2016 at 2:11
  • 2
    @IllidanS4 is correct. I wish people would drop the obsession with "searching" .. it's lazy. They justify a complete lack of research by saying "I didn't know what to search for". Whatever happened to spending time and effort reading? Perusing? Open the documentation, read it through and when you come across the list of operators, pay enough attention to learn what they all are and what they do. Yes, that takes a little bit of time. Good! It's a learning process. But no people nowadays aren't happy unless they can get an answer from Google in sixty seconds. Sigh!! Commented Apr 10, 2016 at 18:23
  • @LightnessRacesinOrbit I don't disagree with anything you said, but would like to point out that there are a couple of unusual facets of this one. Javascript is a 21 year old language that's getting a new operator for the first time in a very, very long time. Because the browser is still the primary env, and support being what it is, it can take a long time for these things to show up in the wild. Not every web developer (particular those with the misfortune of being stuck in IE 6 land) follows the latest stuff they won't be able to use for years but saw in someone else's code. Commented Apr 10, 2016 at 21:18

2 Answers 2

17

Closing enough questions as duplicates hopefully eases finding the canonical :-)

That said, whenever you are looking for canonical JavaScript questions detailing what a certain symbol/syntax/operator does, heed over to What does this symbol mean in JavaScript?. I'm trying to keep the list maintained.

3
  • Thanks, that will at least give me a good place to look for dupes. Especially if they ever implement ::, |>, and all the other ES.next goodies. Commented Apr 8, 2016 at 18:01
  • Toss the spread operator in there, imo...
    – canon
    Commented Apr 10, 2016 at 1:26
  • @canon: Do we have a canonical for that already?
    – Bergi
    Commented Apr 10, 2016 at 10:55
9

I just searched for "javascript equal greater than" and google suggested me "operator", so I used that. First result was w3school, second and third were from MDN, about comparisons; fourth and first from SO, was this duplicated What does => mean in JavaScript? (equals greater than), that links to this question What's the meaning of "=>" (an arrow formed from equals & greater than) in JavaScript?.

As long as you call them individually "equal" + "greater than" you are able to find it (if you use "arrow" the fourth result is the MDN article about the arrow functions). I don't used "arrow function" on none of my searches, but the most common known names from the symbols. One would expect any decent programmer to at least think up till that point, but I think that there's only one Jon Skeet.

1
  • I'm glad the SO one has moved up in the ranks but I sure didn't see it whenever it was that I answered that other question. That will hopefully fix it somewhat. Commented Apr 8, 2016 at 18:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .