Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var h = 3;
- console.log(g(h,function(x){
- function g(h,provider) {
- let value = "";
- (new Array(h)).fill(0).forEach(function(v,i){
- value+=provider(i+1)+"\n";
- });
- return value;
- }
- let f = [(new String(' ')).repeat(h-(x)), (new String('#')).repeat(x), ' ', (new String('#')).repeat(x)];
- return f.join('');
- }));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement