4/7/2023 0 Comments Js slice![]() However, you should use concat() only when you want to merge strings. Or, if you print the variable by counting the length, use the following: string.length // 6 Hopefully, you understand that break down this variable type, it will become an array type. For instance, I have a string that looks like the following: const string = 'string' You should also know that a string is part of an array. ![]() That's why I have written this article to make myself remember all the functions and when to use them.īefore we dive deep into each of the functions, perhaps you should know about the concat() and push() methods. Perhaps all you know is the name and a brief description of what it does. ![]() It might be difficult for you to choose the right option. When you want to cut or add a couple or a lot of characters in a string in JavaScript, there are a lot of options and this might confuse you.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |