Memorizing Tags from Javascript

Hello Frankie here from MO,
I was wondering if a programmer or a front-end developer who uses Javascript, is it really neccesary to remember tags without using some type of note or cheatsheet? curious right now.

1 Like

What do you mean by a “tag”? I am not familiar with any JavaScrript keyword called a “tag”, could you possibly give an example?

i am just new here. i have read somewhere that you do not have to memorize everything. just try to remember what you always use, the rest you can just go right ahead and search online or look at your notes.

1 Like

lol sorry maybe i should correct what I am saying like say if you are using something like a switch or toLowerCase do they usually have to memorize the code like for example

function truncateString(str, num) {
  if (str.length <= num) {
    return str;
  } else {
    return str.slice(0, num > 3 ? num - 3 : num) + '...';
  }
}

truncateString("A-tisket a-tasket A green and yellow basket", 11);

Thanks a bunch mate :slight_smile:

Here is a further explanation to what @AjuneSarate said.


Keywords like switch, if, else, function, return, etc. don’t really need to be memorized. After working with them for not very long, you should remember them without any problem.

.toLowerCase(), .charAt(), .replace(), .slice(), etc. don’t need to be memorized. It is counterproductive to try to memorize them. There are hundreds of these built in methods. Don’t focus on learning the names, focus on what they can do. For example, I know I want to remove the last item of an array and put a new item on the front. While I am writing this right now, I don’t remember the exact name of the function to do this. I know what I want to do, and I know it can be done, because I have done this before. Because I know what I want to do, I just have to find the correct function that does what I want. Let me show you how to do it:

Step 1
Step 2

Simple right? Instead of memorizing, I instead spend my time figuring out how to do it, and then search for the correct method to use. Eventually, you will remember certain of these built in functions such as slice, push, etc. if you use them a lot. There is no need to try to memorize them though.

In case you want to learn a little more about certain of these functions than just a simple Google search, you can read the documentation for them. Check out the extensive documentation for these built in functions you can use:



If you want to find documentation for a specific item, I suggest going to this page and looking for it on the left.


TL;DR - Don’t try to memorize all the built in functions like String.prototype.toLowerCase(). There are too many and they do too much. Know what you want to do and Google searches and documentation will be your friend. Keywords like switch don’t need to be memorized, but after working with them for a brief period of time, you probably will have them memorized without thinking about it.

1 Like

Thank you very much mate I totally appreciate it

1 Like

For me i think coding is all about understanding how to do something,when you need to do something,and have you the tools to complete the task?. Since you understand how they work,you just go and find the right tool for the work you want to do.Imagine someone want you to build them a mock house,they give you wood,nails,sheets,hammer,glue,tape measure… etc everything needed to build the house,it is now up to you to put the stuff together,know what tool to use when you need it,use your imagination to build the best,yet simple house that works…

1 Like