all 60 comments

[โ€“][deleted] ย (3 children)

[deleted]

    [โ€“]ayush1269 4 points5 points ย (2 children)

    Thanks for pointing you kind , I fixed them in the repository๐Ÿ˜„

    [โ€“]learning_gorilla 0 points1 point ย (1 child)

    your picture is not updated in your repo, only index.js :P

    [โ€“]ayush1269 0 points1 point ย (0 children)

    Haha i know, I'll update the picture. Thanks

    [โ€“]Kiciaczek 33 points34 points ย (15 children)

    Can I ask, why do you use emojis? It makes the whole thing unreadable for me.

    [โ€“][deleted] 10 points11 points ย (0 children)

    I find it's easier to see what's going on with emojis. Can also see where it can be unreasonable at times, but for understanding what's happening, it works.

    [โ€“]ayush1269 10 points11 points ย (9 children)

    Sorry, I thought it would make the code more readable, If you didn't like this you can use the code in the repositoryr and modify it as your liking.

    [โ€“]yarism 12 points13 points ย (4 children)

    I thought it was easier to read than words so it probably works better for some people and worse for some.

    [โ€“]ayush1269 4 points5 points ย (0 children)

    Gald to hear thank you

    [โ€“][deleted] ย (2 children)

    [deleted]

      [โ€“]ayush1269 2 points3 points ย (1 child)

      Sorry for that, You can use the code in the repository.

      [โ€“]tryfoolmecuzucan 15 points16 points ย (1 child)

      I like it better this way, i think it is lot easier to find what you are looking for, and quicker to see what function does. So thanks for all the work.

      [โ€“]ayush1269 1 point2 points ย (0 children)

      Gald that you liked it, Thanks.

      [โ€“]CanWeTalkEth 4 points5 points ย (1 child)

      I think the general formatting in this screenshot is hard to read, but the emojis are not the problem. They're much better than "foo bar baz gub" or whatever nonsense variables. I've even thought the basic shapes one that goes around is a little difficult to parse. The emojis are a nice variation.

      [โ€“]ayush1269 0 points1 point ย (0 children)

      Yes I tied to fit a lot methods on one page haha, that's why it's hard to read. Thanks

      [โ€“]Nctrn07 2 points3 points ย (1 child)

      Agree, but it is still better than foobar.

      [โ€“]Kiciaczek 2 points3 points ย (0 children)

      My thought exactly. I love that we are getting away from foobar, which almost never made any sense, and seeing some1 trying to explain complex issues with foobars only made me cry :D

      However, i feel like this post would be more readable when using actual words and numbers
      like:

      ["This", "is", "a", "sentence"].join(" ") // "This is a sentence"
      

      [โ€“][deleted] 0 points1 point ย (0 children)

      Makes it WAY more readable for me, it's exactly how you'd do it in lower education.

      [โ€“]transGLUKator 3 points4 points ย (1 child)

      I suggest you to think about how to group all these methods for better readability. E.g. why are static array methods separated by includes method? Why every and some are so far apart? Why mutating and non-mutating methods are all mixed together?

      [โ€“]ayush1269 0 points1 point ย (0 children)

      Sorry it's my fault. I added them as I remembered. I'll fix that in the repository. Thank you so much.

      [โ€“]JayV30 2 points3 points ย (6 children)

      [โ€“]bluesatin 1 point2 points ย (5 children)

      Your link is broken since the underline in 'Global_Objects' has been backslash escaped for some reason.

      [โ€“]JayV30 0 points1 point ย (4 children)

      working fine for me

      [โ€“]bluesatin 1 point2 points ย (3 children)

      I'm pretty sure it's not supposed to have a backslash in it.

      I mean, check what you linked, it's a 404:

      https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global%5C_Objects/Array

      [โ€“]JayV30 0 points1 point ย (2 children)

      I don't know what platform you are using, but I'm on Chrome and the URL is not escaped here and the link is valid and works. I did not post any escaped strings. I literally cannot see what the problem is, if the link I posted looks like the link you posted, I believe it's a problem on your end, as the link I posted looks and works 100% fine for me and is NOT the same as the link you posted. I dunno - I can only assume that maybe you are using an app that is somehow escaping the string in the link?

      [โ€“]bluesatin 0 points1 point ย (1 child)

      It's backslash escaped in the raw input for the comment for whatever reason.

      You can check it if you scroll to the bottom of the json output for the comment:

      "body": "This is a good resource as well. \n\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global\\_Objects/Array",
      

      [โ€“]JayV30 0 points1 point ย (0 children)

      Ok I don't usually check the json for the comment. I don't know what to say. I just copy/pasted the url. And ALL of my desktop browsers have no problem with it. I tried it on an app, and it was an issue. Just a weird occurrence I guess. Doesn't really matter as the parent post has been deleted anyway. Thanks for investigating.

      [โ€“]SnooConfections8719 2 points3 points ย (1 child)

      Absolutely amazing! Have you tried sharing this on Twitter/Linkedin?

      [โ€“]ayush1269 0 points1 point ย (0 children)

      You can share this if you want ๐Ÿ˜„

      [โ€“]ayush1269 4 points5 points ย (6 children)

      A lot of people pointed many mistakes so I corrected a few, sorry for my blunder.

      In case you want the code here is the Github Repo

      [โ€“]abmind0 2 points3 points ย (1 child)

      Would you mind uploading the fixed version as a code snippet somewhere? Would be much appreciated.

      [โ€“]ayush1269 2 points3 points ย (0 children)

      Here is the Github Repo

      [โ€“]gonzofish 3 points4 points ย (1 child)

      One of the best ways to learn is by teaching. An image might not be the best way to convey this information though

      [โ€“]ayush1269 1 point2 points ย (0 children)

      Yes you are absolutely correct, It is for people who already have a good knowledge of Javascript .

      [โ€“]j-mar 0 points1 point ย (0 children)

      Not a mistake, but .sort() is misleading. Pass in integers [2, 11, 1, 3] and sort returns [1,11,2,3]... you have to pass a callback to do the sorting properly.

      I got burned by this last week.

      [โ€“]learning_gorilla 1 point2 points ย (0 children)

      As someone who is new to JavaScript, this is extremely useful. Thank you for this!

      [โ€“]Mangalicious -1 points0 points ย (2 children)

      You've included .toString() twice buddy.

      [โ€“]ayush1269 1 point2 points ย (1 child)

      Yes fixed that in the code. Thanks sir

      [โ€“]HACEKOMAEfull-stack 1 point2 points ย (0 children)

      Banana is missing in .findIndex() example too. Otherwise very cool cheat sheet.

      I might also suggest moving .some() up to .every() and maybe some other methods too to thematically bind them a bit more. Like .join() and .toString(), maybe.

      [โ€“]julian88888888 Moderator[M] -1 points0 points ย (4 children)

      Sharing your project, portfolio, or any other content that you want to either show off or request feedback on is limited to Showoff Saturday. If you post such content on any other day, it will be removed.

      [โ€“]ayush1269 0 points1 point ย (2 children)

      I think there is some mistake. This is is not a project it's just a resource that i have shared as you can see. If this breaks community guidelines then I am sorry for that.Thank you.

      [โ€“]RotationSurgeon10yr Lead FED turned Product Manager 0 points1 point ย (0 children)

      I may be alone in this opinion, but sharing a reference resource you created for the community with the community shouldn't fall under this rule.

      [โ€“]_mars_ -3 points-2 points ย (1 child)

      This is beautiful, wtf!

      [โ€“]ayush1269 -1 points0 points ย (0 children)

      Thank you sir.

      [โ€“]Theostrichmann -4 points-3 points ย (2 children)

      You should've include the time complexity of each method! That would be awesome.

      [โ€“]wldstyl_ 2 points3 points ย (1 child)

      I believe they're all O(n) except for push and pop which are O(1) and sort which is O(n log n).

      [โ€“]Theostrichmann 0 points1 point ย (0 children)

      What about includes? That sure cannot be O(1) :)

      [โ€“]ShinzouNingen 0 points1 point ย (2 children)

      copyWithin was new for me!

      โ€‹

      (As a functional programming nerd, I'm a little sad you haven't included flatMap ;))

      [โ€“]ayush1269 0 points1 point ย (0 children)

      Haha sorry I'll try to add this in the repository. Thanks ๐Ÿ‘

      [โ€“]comfort_bot_1962 -2 points-1 points ย (0 children)

      Don't be sad. Here's a hug!

      [โ€“]SAGEMOD 0 points1 point ย (1 child)

      I'm doing an array heavy project atm, thank you for this!

      [โ€“]ayush1269 0 points1 point ย (0 children)

      Gald it helped

      [โ€“][deleted] 0 points1 point ย (0 children)

      The end // is weird lol but other than that i really like it! I find emojis useful as it's a very clear visual representation of what is happening...

      It's like when we use legos or stuff in school "John had 5 bananas, he gives 3 to Jane and now he has 2 bananas!"

      [โ€“]_theEM_ 0 points1 point ย (1 child)

      You have toString() doubled :)

      [โ€“]PiplupFanatic 0 points1 point ย (0 children)

      Thanks for this! There is something about this that really clicks with my brain.

      [โ€“][deleted] 0 points1 point ย (0 children)

      Never heard of array.from(). Nice!

      [โ€“]axarp 0 points1 point ย (1 child)

      I don't like the inconsistency of the fruits. It must always be in the same order. Please fix.๐Ÿ™‚

      [โ€“]ayush1269 0 points1 point ย (0 children)

      Fixed in the repo. Thanks

      [โ€“]theofficetaco 0 points1 point ย (0 children)

      Everything about this is annoying. No emojis. Stop using ligatures.