Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function f(d) {
- if (1 != d && 2 != d) {
- for (var a = [[1], [1, 1]], b = 2; b < d; b++) {
- for (var e = [1], c = 1; c < a[b - 1].length; c++) {
- e.push(a[b - 1][c - 1] + a[b - 1][c]);
- }
- e.push(1);
- a.push(e);
- }
- a.reduce(function(a, b) {
- return a.concat(b);
- }, []);
- }
- }
- f(1);
- f(8);
Add Comment
Please, Sign In to add comment