Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
In the maybeNew class, there are 2 returns (they are not seperated with a else).
- The example before was clear but i ll explain (just to be sure)
Lets say giveSecret was 5, so the return 42 makes the value 42 now. - Back to the other code. Where do the returns go? -> maybeNew = 0? But why are there 2 returns. Does the compilier make the value first 1 and then 0? Isnt it useless to use 2 returns or just for the example?