-
Beautify Array Of Arrays And Debug Your Code Better!
Hello, checkiomates🐱👤!
Glad to meet you in our weekly digest again! Let's practise a new mission and read something interesting!
We decided to develop a brief explanation of mission complexity levels, which are used at CheckiO. We would be glad to receive your feedback, suggestions to the post itself, about explanation clarification of complexity levels and opinions about distinct missions, which complexity level should be changed for specific account difficulty.
💡TIP:
At your profile, after clicking on big percent number of your progress, you may see module and methods you have already used in your shared solutions. If you want to discover all CheckiO features, visit our tutorial. It's a longread, but it's worth it!
🏁MISSION:
List Beautify by freeman_lex -
Let's assume, you are given an array of arrays of positive/negative integer/float numbers. Your function should return a single string (multiline if more than one inner array), where numbers in columns should be right-aligned. There must be exactly one whitespace between the longest number in a column incl. minus (if present) and the previous comma in a row. All rows of the same length, wrapped together in the array brackets.
assert.strictEqual( listBeautify([ [1, 2, 10, 150], [10, 2, 1000, 2], [1, 120, 1, 1000], ]), "[[ 1, 2, 10, 150],\n [10, 2, 1000, 2],\n [ 1, 120, 1, 1000]]" ); assert.strictEqual( listBeautify([[1, 10, 100, -1000]]), "[[1, 10, 100, -1000]]" );
📖ARTICLE:
10 Debugging Tips for Beginners Programmers -
Learning how to program can be challenging as you have all these different new skills to learn. One of those things is Debugging and this is a challenge for most of my students. In this post the author gives some debugging tips for beginner programmers he which he knew when started programming.
👩💻CODE SHOT:
How do you think, what the following code does?
function ?????(n: number): number { return n < 2 ? 1 : n * ?????(n-1) }
🙌 Thanks for your attention! Hope to meet you at CheckiO. We are really interested in your thoughts! Please, leave a comment below! ⤵
Welcome to CheckiO - games for coders where you can improve your codings skills.
The main idea behind these games is to give you the opportunity to learn by exchanging experience with the rest of the community. Every day we are trying to find interesting solutions for you to help you become a better coder.
Join the Game