8 kyu
Training JS #16: Methods of String object--slice(), substring() and substr()
7,403 of 7,406myjinxin2015
Loading description...
Fundamentals
Tutorials
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
Javascript update:
-Updated to Node 18
-Removed the html formatting in the output of the tests
-Moved test announcement from console.log to assertion message.
Merged.
I think it's important to explain further the difference between
slice()
andsubstring()
.Even though
slice
accepts negative indices, it doesn't mean thatsubstring
would throw an error:it would only treat it as
0
.Also, if the start index is bigger than the end index:
Maybe you could add those differences in the "lesson" part?
As always with this group of devs, they can use some help writing the instructions more clearly.
Although I agree, I don't think it's a matter of not being clear, but rather of not mastering the English language...
(Which I obviously don't for instance...)
This comment has been hidden.
Please don't post solutions in Discourse.
This comment has been hidden.
Nice Kata! it forced me to use some methods that I haven't practiced enough. The description of the task wasn't totally clear to me, but looking at the test cases it wecame clear. Thanks!
difficult for 8kyu
I think it's too difficult for 8kyu.
Ranks can't be changed.
This comment has been hidden.
This comment has been hidden.
methods like blik and big are deprecated and I think if purpose of this task iis to educate people it should be done well. please consider adding info to description or remove deprecated methods.
I don't know why blink() and big() are deprecated? Can you explain it? Or give me a reference. Thank you ;-)
https://www.w3.org/wiki/HTML/Elements/blink https://developer.mozilla.org/pl/docs/Web/JavaScript/Referencje/Obiekty/String/blink
Ok,Thanks a lot ;-)