Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
@B1ts I am pretty sure in that case the error would say:
TypeError: number.replace() is not a function.
But instead it says "string.replace()" is not a function.
My misstake, you are right, thanks
Nope, there is 1 test where argument is a number. (IDK why, but there is :/)
Try adding
console.log(typeof string)
I used this methods on an income function argument...and income argument is a STRING, but when I used string.toString.(split/replace) everything is work, but i dont understand why?
In this function icome argument is a string already...am I right?
Because you're using it on something that is NOT A STRING.
5.replace() doesn't exist, neither does [].replace (IDK what you're actually using it on)
TypeError: string.replace is not a function
at toUnderscore
at /home/codewarrior/index.js:19:20
at /home/codewarrior/index.js:20:5
and if I use string.replace I have simmilar error
You're trying to use
.split()
on something that isn't a string.I have this error
TypeError: string.split is not a function
at toUnderscore
at /home/codewarrior/index.js:27:20
at /home/codewarrior/index.js:28:5
at Object.handleError
If i wanted to use string.split('') method in JS