????????14:??????????????
????var bar = true;
????console.log(bar + 0);
????console.log(bar + "xyz");
????console.log(bar + true);
????console.log(bar + false);
?????????
????1
????truexyz
????2
????1
???????????????????????
????Number + Number -> ???
????Boolean + Number -> ???
????Boolean + Boolean -> ???
????Number + String -> ????
????String + Boolean -> ????
????String + String -> ????

????????15:??????????????
????var z = 1?? y = z = typeof y;
????console.log(y);
????????? undefined??js?и???????????????????? ??????????????????????????????
???????????????
????var z = 1
????z = typeof y;
????var y = z;
????console.log(y);

????????16:??????????????
????var foo = function bar(){ return 12; };
????typeof bar();
????????????????bar is not defined???????????????????У??????????????
????var bar = function(){ return 12; };
????typeof bar();
??????????
????function bar(){ return 12; };
????typeof bar();
???????????????????
????var foo = function bar(){
????// foo is visible here
????// bar is visible here
????console.log(typeof bar()); // Work here : )
????};
????// foo is visible here
????// bar is undefined here

????????17:???????????????????
????var foo = function(){
????// Some code
????};
????function bar(){
????// Some code
????};
????foo??????????????????????????????????????????????????????
????????????????????′??????????
????console.log(foo)
????console.log(bar)
????var foo = function(){
????// Some code
????};
????function bar(){
????// Some code
????};
????????
????undefined
????function bar(){
????// Some code
????};
????????????? foo ????????? undefined???? bar???????????????
????JavaScript????????????????????
???????????????JavaScript ???????????????????????С?
????// foo bar?????λ???????
????function bar(){
????// Some code
????};
????var foo;
????console.log(foo)
????console.log(bar)
????foo = function(){
????// Some code
????};
???????????????????????

????????18:??????????????
????var salary = "1000$";
????(function () {
????console.log("Original salary was " + salary);
????var salary = "5000$";
????console.log("My New Salary " + salary);
????})();
?????????
????Original salary was undefined
????My New Salary 5000$
???????????????????????????????????′???
????var salary = "1000$";
????(function () {
????var salary ;
????console.log("Original salary was " + salary);
????salary = "5000$";
????console.log("My New Salary " + salary);
????})();

????????19:???? instanceof ??????????????????????
????function foo(){
????return foo;
????}
????console.log(new foo() instanceof foo);
????instanceof???????????ж????????????????????
??????
????function Animal(){
????//?????дreturn???
????return this;
????}
????var dog = new Animal();
????dog instanceof Animal // Output : true
??????????????foo?????
????function foo(){
????return foo;
????}
????????
????// here bar is pointer to function foo(){return foo}.
????var bar = new foo();
???????? new foo() instanceof foo ???? false

????????20: ??????????JavaScript??”????????”?????????????”????????”??????
????var counterArray = {
????A : 3??
????B : 4
????};
????counterArray["C"] = 1;
????????????????????key?????????????
????Object.keys(counterArray).length // Output 3
??????????ο???: 21 Essential JavaScript Interview Questions | Codementor
??????????????????????????????е?????????????棬?????????