Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ```javascript
- const a = 1;
- let b = 2;
- var c = 3;
- console.log(window.a, window.b, window.c);
- ```
- A) 1, 2, 3
- B) undefined, 2, 3
- C) undefined, undefined, 3
- D) undefined, undefined, undefined
- ---
- ```javascript
- let myArray = ['one', 'two', 'three', 'four', 'five'];
- myArray.fill('Peach');
- console.log(myArray);
- // ["Peach", "Peach", "Peach", "Peach", "Peach"]
- myArray.fill(7, 2);
- console.log(myArray);
- // ["Peach", "Peach", 7, 7, 7]
- myArray.fill('Onion', 2, 4);
- console.log(myArray);
- // ["Peach", "Peach", "Onion", "Onion", 7]
- myArray.fill('Apple', -4, -2);
- console.log(myArray);
- // ["Peach", "Apple", "Apple", "Onion", 7]
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement