Слайд 2Test#1
const distanceToMars =`152930000km is the distance to Mars! ?`;
const timeToMars = `It takes 300 days to get to Mars ⏳`;
console.log(parseInt(distanceToMars ));
console.log(parseInt(timeToMars ));
Слайд 3Test#1
A) 152930000 and 300
B) NaN and NaN
C) 152930000 and NaN
D) NaN and 300
Слайд 4Test#1
A) 152930000 and 300
B) NaN and NaN
C) 152930000 and NaN
D) NaN and 300
Слайд 5Test#2
const mars = {color: 'red', radius: 3400};
const earth = {color: 'blue', radius:
6400};
const sizeDiff = Math.abs(mars.radius - earth.radius);
const getSizeDiff = () => Math.abs(mars.radius - earth.radius);
mars.radius += 1000
console.log(sizeDiff, getSizeDiff() );
Слайд 6Test#2
A) 2000 2000
B) 3000 3000
C) 2000 3000
D) 3000 2000
Слайд 7Test#2
A) 2000 2000
B) 3000 3000
C) 2000 3000
D) 3000 2000
Слайд 8Test#3
const rocketProperties = {
speed: 30201,
distance: 204,
fuel: null
}
const {fuel = 892}
= rocketProperties
console.log(fuel)
Слайд 9Test#3
A) 892
B) null
C) undefined
D) ReferenceError
Слайд 10Test#3
A) 892
B) null
C) undefined
D) ReferenceError
Слайд 11Test#4
const fruit = [`?`, `?`, `?` ]
fruit.slice(0, 1)
fruit.splice(0, 1)
fruit.unshift(`?`)
console.log(fruit)
Слайд 12Test#4
A) [`?`, `?`, `?` ]
B) [`?`, `?` ]
C) [`?`, `?`, `?` ]
D) [`?`, `?`, `?`, `?` ]
Слайд 13Test#4
A) [`?`, `?`, `?` ]
B) [`?`, `?` ]
C) [`?`, `?`, `?` ]
D) [`?`, `?`, `?`, `?` ]
Слайд 14Test#5
const person = { name: "Lydia"}
const person2 = person
Object.freeze(person);
person2.name = "Sarah"
console.log(person.name, person2.name)
Слайд 15Test#5
A) Lydia Sarah
B) Sarah Sarah
C) Lydia Lydia
D) TypeError