We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
这是一篇水文,老板给面试同学出的笔试题,顺手练一下
function toBinary(n) { function toBinaryIter(n, s) { if(n === 0) { return s || '0' } var a = n / 2 , b = n % 2 return toBinaryIter(a|0, b+s) } return toBinaryIter(n, '') } toBinary(0) === (0).toString(2) toBinary(1) === (1).toString(2) toBinary(3) === (3).toString(2) toBinary(10) === (10).toString(2) toBinary(101) === (101).toString(2)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
这是一篇水文,老板给面试同学出的笔试题,顺手练一下
The text was updated successfully, but these errors were encountered: