static values with fill example fix

pull/25/head
Patrick Njuguna 6 years ago committed by GitHub
parent 980c1e479d
commit 4f7583ab95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -309,10 +309,10 @@ const eightXvalues = Array(8).fill('X') // it creates eight element values
console.log(eightXvalues) // ['X', 'X','X','X','X','X','X','X'] console.log(eightXvalues) // ['X', 'X','X','X','X','X','X','X']
const eight0values = Array(8).fill(0) // it creates eight element values const eight0values = Array(8).fill(0) // it creates eight element values
console.log(eight0Values) // [0, 0, 0, 0, 0, 0, 0, 0] console.log(eight0values) // [0, 0, 0, 0, 0, 0, 0, 0]
const four4values = Array(4).fill(4) // it creates 4 element values const four4values = Array(4).fill(4) // it creates 4 element values
console.log(four4Values) // [4, 4, 4, 4, 4, 4, 4, 4] console.log(four4values) // [4, 4, 4, 4, 4, 4, 4, 4]
``` ```
#### Concatenating array using concat #### Concatenating array using concat

Loading…
Cancel
Save