Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (() => {
- let str = 'v13.9.0, v12.16.1, v11.15.0, v10.19.0, v9.11.2, v8.17.0, v7.10.1, v6.17.1, v5.12.0, v4.9.1';
- const lines = [];
- while (str.length > 0){
- let x = str.match(/.{1,20}(?<=,)/);
- lines.push(x);
- if (!x) break;
- [ x ] = x;
- str = str.substring(x.length, str.length);
- }
- console.log(lines.join('\n'));
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement