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.
Beside copying from w3fools, this "solution" is neither clever nor best practice - it is inherently wrong.
Bitshifting by zero will have a sideeffect on large numbers, especially negative ones.
The output will be a positive number that is way too small and not the result of the calculation anymore. Bitshifting using
>>>
will replace the first bit with a zero, converting negative numbers into positive ones.dont work for big numbers
This comment is hidden because it contains spoiler information about the solution
It works the same with or without "">>> 0"