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.
Because it's a supremely bad habit to get into. You really shouldn't be concatenating integers and strings, even if the poorly-designed language lets you do it. Quick: what's the correct result of
"3" + 5
? Is it 8, or "35"? Javascript gives you one answer, PHP gives you another, and sensible languages like Python, Haskell, etc. give you the only correct answer: an error.This is a fundamental part of the language - then why shouldn't you takle advantage of it? Everyone with a fair amount of knowledge of JS know how this works.
This solution adds integers and strings, which is never a good idea. Instead of
0+r
,0+g
and0+b
, it would have been better to write"0"+r
,"0"+g
, and"0"+b
.Indeed.
That's just overkill.
You're right about self.
It's more of a reflex than a real will.
For the prototype part. Indeed... my bad.
Oh ! Right, I missed that.
Thank you for your answer.
Hi, I'm not that good with regexp,
but can anyone explain to me why this one doesn't work :
Which IP wouldn't work for example?
This comment is hidden because it contains spoiler information about the solution