Code To Go

Code To Go

Find updated snippets for common JavaScript use cases

45 followers

Code to go helps developers learning JavaScript find up to date, accurate and ready to use snippets of JavaScript code for common use cases.
Code To Go gallery image
Code To Go gallery image
Code To Go gallery image
Code To Go gallery image
Launch Team
Tines
Tines
The intelligent workflow platform
Promoted

What do you think? …

Navid Mirzaie Milani
This is really nice! i already added to my fav!.
Jad Joubran
@navidmirzaie I'm glad you like it!
EmbedAPI
@jadjoubran you're welcome :)
Rob Moore
Just a heads up on your featured iteration example on Javascript array iteration- "For...in" loops are generally NOT recommended for arrays because the order is not guaranteed (which is generally important for arrays). I don't want anyone to get a bad first impression of the product just because of the choice of example.
Jad Joubran
Hi @robmoore thanks for your comment! Did you mean "For .. of" or "For .. in"? I've used "For .. of" rather than "For ..in" or any other alternative because it's ES2015+ and because you can break from it using the break keyword whereas with forEach or .map you can't break from it. What do you think?
Mitch Lillie
@robmoore @jadjoubran I agree—the example of using "for...of" is nice, but needs to specify "when the order is not important". From a performance standpoint, to iterate over an array and keep the order preserved, a plain old "for" loop is the best, though it's uglier
Nate Davis
Love the design, looks great on my phone. Looking forward to using this. Thanks for the awesome resource.
Jad Joubran
@nate_davis we're glad you like it :D
Andy Parkhills
Great and clean UI! Search works smooth but Use Cases page needs categorization (ex: Syntax, Variables, Assignment, Strings, Numbers, etc.) in some kind of a possible tagging format.
Jad Joubran
@aparkhills makes sense, noted :D thanks!
Abdeslam Ahrbil

I need it inside my editor.

Pros:

Easy to use.

Cons:

Maybe if there is an extenstion for code editor would be better..

Pierrick
Love the idea but I would add more use cases to the homepage.
Jad Joubran
@pierrickgt Will do soon! thanks :D
Just a Random Person

Why would you want to use this over say https://stackoverflow.com/ it'll usually end up in staggeration of information. The use-cases / snippets shared here may or may note apply to your use-case and if you knew what applies best to your use-case....? I do see a point in making a process out of this but this effort could be used to populate these questions over StackExchange or MDN and not fragment information further.

Pros:

- Copy paste friendly

Cons:

- Lack of information of where something is applicable

Jad Joubran
Thanks @_mathdotrandom! The purpose of Code to go is *not* to replace Stackoverflow, however there are plenty of use cases where the answers on stackoverflow are outdated.. even though you have the correct answer there, it's not marked as `accepted` and we can't change that.. (like this one: https://stackoverflow.com/questi...) Also most of the use cases on Codetogo point to MDN whenever possible, example: https://codetogo.io/how-to-inter... MDN is an excellent resource for intermediate to advanced developers, but beginners don't really understand that in that for example that the `Event` in `Event.preventDefault` points to the `Event` interface and that they need to reference the `event` variable (https://developer.mozilla.org/en...)
Bella Nurcahaya
HEALTHY IS MANDATORY Hello Friends, The information you share is very interesting. I want more information from you,Thank you
12
Next
Last