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.
When specifying what to replace in the replace method - why does /./g work? Wouldn't that break if there was a "." in the string? My solution had /[ATCG]/g as the "what to replace" and it also worked, but I cannot find the meaning of /./g anywhere online. I am slightly confused as to whether or not this is a best practice - or if it simply worked in this instance since there are no "." symbols in the string that is being replaced.
When specifying what to replace in the replace method - why does /./g work? Wouldn't that break if there was a "." in the string? My solution had /[ATCG]/g as the "what to replace" and it also worked, but I cannot find the meaning of /./g anywhere online. I am slightly confused as to whether or not this is a best practice - or if it simply worked in this instance since there are no "." symbols in the string that is being replaced.
When specifying what to replace in the replace method - why does /./g work? Wouldn't that break if there was a "." in the string? My solution had /[ATCG]/g as the "what to replace" and it also worked, but I cannot find the meaning of /./g anywhere online. I am slightly confused as to whether or not this is a best practice - or if it simply worked in this instance since there are no "." symbols in the string that is being replaced.
When specifying what to replace in the replace method - why does /./g work? Wouldn't that break if there was a "." in the string? My solution had /[ATCG]/g as the "what to replace" and it also worked, but I cannot find the meaning of /./g anywhere online. I am slightly confused as to whether or not this is a best practice - or if it simply worked in this instance since there are no "." symbols in the string that is being replaced.