That's great! thank you.
I am sorry my description is misleading. I add additional description (compare from a mathematical point) . thank you for your patience!
(compare from a mathematical point)
Already fix it again. Thank you! And a) It indeed return true, because 7 indeed between between 0 - 65536 b) I change my describe from between 1 - 65535 to between 0 - 65536 Thank you again!
7
between 0 - 65536
between 1 - 65535
Thanks for your feedback! There indeed only 4 tests, but it becaouse i include some similarity test in one it. eg: the first test:
it
const range = num => Array(num).fill().map((_, i) => -~i+'') describe('matched', () => { it('should return true when input between 1 - 65535', () => { let i const assertRes = range(65535).every(v => { i = v return match(v) }) Test.assertEquals(assertRes, true, `when input equal to ${i}`) }) })
It include all matched input that from '1' to '65535'. It all should return true. If I extract them one by one, I can write 65535 tests!
Thanks for your feedback! Already fix it. I move it to a new test.
Thanks for feedback.
I think use regexp or not, it's up to user. What I make wrong in expressing? Or should I remove the label of RegExp in this question?
Thanks for your suggestion to my first kata :). I alrady change my description just now. Again, thanks.
like this :)
oh~ what can I say :)
Sure, you can add supplementary description. "The input string will never be empty"
Boundary conditions should be considered. For example, empty string ''.
This comment is hidden because it contains spoiler information about the solution
Also you can directly google "JavaScript Arrow Function"
the new features of ES6. You can study it from es6tutorial by ruanyf. :)
There is a bug. isBalanced('){', '(){}') It should return false, but actually return true in your function. You can fix it, change the code.
isBalanced('){', '(){}')
else stack.unshift(i)
to
else { if(i % 2) return false; stack.unshift(i); }
Loading collection data...
That's great! thank you.
I am sorry my description is misleading. I add additional description
(compare from a mathematical point)
.thank you for your patience!
Already fix it again.
Thank you!
And
a) It indeed return true, because
7
indeed betweenbetween 0 - 65536
b) I change my describe from
between 1 - 65535
tobetween 0 - 65536
Thank you again!
Thanks for your feedback!
There indeed only 4 tests, but it becaouse i include some similarity test in one
it
.eg: the first test:
It include all matched input that from '1' to '65535'. It all should return true.
If I extract them one by one, I can write 65535 tests!
Thanks for your feedback!
Already fix it. I move it to a new test.
Thanks for feedback.
I think use regexp or not, it's up to user.
What I make wrong in expressing? Or should I remove the label of RegExp in this question?
Thanks for your suggestion to my first kata :).
I alrady change my description just now.
Again, thanks.
like this :)
oh~ what can I say :)
Sure, you can add supplementary description.
"The input string will never be empty"
Boundary conditions should be considered. For example, empty string ''.
This comment is hidden because it contains spoiler information about the solution
Also you can directly google "JavaScript Arrow Function"
the new features of ES6. You can study it from es6tutorial by ruanyf. :)
There is a bug.
isBalanced('){', '(){}')
It should return false, but actually return true in your function.
You can fix it, change the code.
to
Loading more items...