Skip to content

Instantly share code, notes, and snippets.

@kicumkicum
Last active February 2, 2017 10:13
Show Gist options
  • Select an option

  • Save kicumkicum/a00fd55cf45b995639dbcceceb0c56d9 to your computer and use it in GitHub Desktop.

Select an option

Save kicumkicum/a00fd55cf45b995639dbcceceb0c56d9 to your computer and use it in GitHub Desktop.

Теоритеческие вопросы

* перечислить базовые типы JavaScript
* в чем разница между `.call` и .`apply?`
* что делает и для чего нужна функци `.bind`?
* в чем отличие между `var`, `let`, `const`
* в чем отличия между `function` и `arrow function`
* что такое `scope` и как он работает
* как работает наследование в JS
* чем отличается абстрактный класс от интерфейса

Практичесике вопросы

Что мы увидим в консоли и почему?

for (var i = 0; i < 10; i++) {
	setTimeout(function() {
		console.log(i);
	}, 0);
}
function test() {
   console.log(a);
   console.log(foo());
   
   var a = 1;
   function foo() {
      return 2;
   }
}

test();
(function() {
	f();

	f = function() {
		console.log(1);
	}
})()

function f() {
	console.log(2)
}

f();
(function() {
	var x = 1;

	function x() {};
	
	console.log(x);	
})()
var obj = {
	a: 1
};

(function(obj) {
	obj = {
		a: 2
	};

})(obj);

console.log(obj.a);
var fullName = 'John Doe';
var obj = {
   fullName: 'Colin Ihrig',
   prop: {
      fullName: 'Aurelio De Rosa',
      getFullName: function() {
         return this.fullName;
      }
   }
};

console.log(obj.prop.getFullName());

var test = obj.prop.getFullName;

console.log(test());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment