Posts by reidner sousa • 9 points
2 posts
-
-3
votes1
answer47
viewsQ: clone array functions and objects
Make a function to clone arrays. (Tip: clone = [ ...clone ]) Make a function to clone objects. (Tip: clone = { ...objeto }) let total = 3, array1 = [1,2,3] const clonar = () => { if (total ===…
-
0
votes2
answers64
viewsQ: How to mount a number 1 pyramid of 20 consecutive lines?
I have the code: let i = 0 for(i = 0; i<= 20; i++){ const p = 1**i console.log(p) } And I expect a way out like: 1 11 111 1111 11111 111111 1111111 11111111 But I’m failing to create this form of…