CodeNewbie Community 🌱

Cover image for February 11th, 2021: What did you learn this week?
Nick Taylor
Nick Taylor

Posted on

February 11th, 2021: What did you learn this week?

It's that time of the week folks. So wonderful code newbies, what did you learn this week? It could be programming tips, career advice etc.

![A picture it a dog waving their paw with the caption β€œLearning, cool at school or at home”](

Feel free to comment with what you learnt and/or reference your TIL post to give it some more exposure. πŸ‘‡πŸ‘‡πŸ»πŸ‘‡πŸΌπŸ‘‡πŸ½πŸ‘‡πŸΎπŸ‘‡πŸΏ


Top comments (3)

r002 profile image
Robert Lin

Three newbie lessons I learned this week (in Javascriptlandia):

  1. .sort(...) sorts alphabetically! (Even on numbers!) So to sort an array of numbers in JS, you've gotta do this.

  2. I've been tirelessly working on my personal hobby blogging app and have been having fun with building my custom editor. Apparently I've been living under a rock all these years though; literally only learned about contenteditable this past week. So cool.

  3. Finally, I think this is a bit tough for newbies, but understanding this is seriously so important if you're working in JavaScript. In general, as I've gotten older, I've simply made it a general personal rule (a more "functional" approach, is the parlance) to never mutate (ie. change) arguments that I pass into my functions. But if you must, be sure to understand how it all works in JS-land. (You'll literally find SO and Reddit articles discussing this topic dating back to the beginning of time.)

Many helpful articles abound on the interwebs, but I liked this one.

Hope everyone had a most wonderful week! The learning never stops! πŸ˜€πŸŽ†πŸ˜„πŸš€

nickytonline profile image
Nick Taylor

Captain America saluting

r002 profile image
Robert Lin • Edited

Thanks, Nick! Btw, one burning question I had about the Forem editor... on the main editor where people write articles, I noticed that you guys don't support keyboard shortcuts (eg. <ctrl+b> to bold and <ctrl+i> to italicize, etc). But here in the comment editor, shortcuts are supported! 🀨

Is this a deliberate design decision by the Forem devs to purposefully nerf the Forem editor to encourage people to write shorter articles? If so, I totally understand (makes sense to encourage bite-sized chunks of consumable content versus people writing Homeric odysseys). But if not, I'm actually really tempted to make a PR for keyboard shortcuts in the main article editor. πŸš€

Thanks for clarifying! πŸ™πŸ™πŸ™