Слайд 3[1, 2, 3] + [4, 5, 6] // -> '1,2,34,5,6'
![[1, 2, 3] + [4, 5, 6] // -> '1,2,34,5,6'](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/981334/slide-2.jpg)
Слайд 4console.log(1 <2 <3)
console.log(3> 2> 1)
![console.log(1 console.log(3> 2> 1)](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/981334/slide-3.jpg)
Слайд 5console.log(1 <2 <3) // -> true
console.log(3> 2> 1) // -> false
![console.log(1 true console.log(3> 2> 1) // -> false](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/981334/slide-4.jpg)
Слайд 6var a = 10;
function Foo() {
if (true) {
let a =
![var a = 10; function Foo() { if (true) { let a](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/981334/slide-5.jpg)
5;
}
alert(a);
}
Foo();
Слайд 7var a = 10;
function Foo() {
if (true) {
let a = 5;
}
alert(a); //10
}
Foo();
![var a = 10; function Foo() { if (true) { let a](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/981334/slide-6.jpg)
Слайд 8Как очистить массив?
let arr = [1,2,3];
![Как очистить массив? let arr = [1,2,3];](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/981334/slide-7.jpg)
Слайд 91. arr = [];
2. arr.length = 0;
3. arr.splice(0, arr.length);
4. while(arr.length) {
arr.pop();
}
![1. arr = []; 2. arr.length = 0; 3. arr.splice(0, arr.length); 4. while(arr.length) { arr.pop(); }](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/981334/slide-8.jpg)
Слайд 10const test1 = 1;
if(true){
const test2 = 2;
}
console.log(test1);
console.log(test2);
![const test1 = 1; if(true){ const test2 = 2; } console.log(test1); console.log(test2);](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/981334/slide-9.jpg)