├── chapter-7
├── Korean.png
├── flags.png
├── Chinese.png
├── English.png
├── Japanese.png
├── loading.gif
├── large_image.jpg
├── my_important_image.jpg
├── not_important_image.jpg
├── sleep.js
├── 7-316_script_at_bottom.html
├── 7-312_script_in_head.html
├── 7-352_separated_flags.html
├── 7-353_image_sprite.html
├── 7-320_img_lazy_load.html
├── 7-317_script_lazy_load.html
└── 7-323_img_lazy_load_background.html
├── chapter-6
├── notice_list.json
├── 6-297_dom_reflow_inside_loop.js
├── 6-297_inefficient_dom_reflow.js
├── 6-304_web_worker.html
├── worker.js
├── 6-269_nesting_level_test.html
├── 6-307_shared_workder.html
├── sharedWorker.js
├── 6-266_requestanimationframe_shim.js
├── 6-279_position_relative_absolute.html
├── 6-249_settimeout_2_seconds.html
├── 6-272_dom_repaint.html
├── 6-300_memoization_dom_search.html
├── 6-275_dom_reflow.html
├── 6-252_same_settimeout.html
├── 6-301_cache_dom_variable.html
├── 6-255_setinterval_thread_queue.html
├── 6-295_change_background.html
├── 6-293_changing_display.html
├── 6-290_dom_clone.html
├── 6-281_reflow_minimized_notice.html
├── 6-258_clock_with_setinterval.html
├── 6-286_documentfragment.html
└── 6-261_setinterval_time_difference.html
├── chapter-4
├── 4-146_original_object_create.js
├── 4-114_new_with_function.html
├── 4-115_new_with_class.html
├── 4-155_object_create_shim.js
├── 4-147_object_create_inheritance.html
├── 4-149_object_create_initialize.html
├── 4-135_avoiding_prototype.html
├── 4-116_calling_function.html
├── 4-140_prototype_inheritance.html
├── 4-140_object_inheritance.html
├── 4-154_class_extends.html
├── 4-153_object_create_with_new.html
├── 4-114_new_with_java.java
├── 4-150_object_create_configure.html
├── 4-139_early_inheritance.html
├── 4-118_this.html
├── 4-133_printing_all_properties.html
├── 4-132_prototype_chain.html
├── 4-148_object_create_object.html
├── 4-130_circular_reference.html
├── 4-151_accessor.html
└── 4-124_prototype.html
├── chapter-2
├── 2-26_testing_function_scope.html
├── 2-39_obscure_with.html
├── 2-27_testing_with_scope.html
├── 2-26_testing_catch_scope.html
├── 2-40_alternative_style_settings.html
├── 2-41_closer_example.html
├── 2-25_testing_block_scope.html
├── 2-45_closer_easy_example.html
├── 2-22_scope_issue.html
├── 2-35_understanding_with.html
├── 2-28_resolve_with_with.html
├── 2-32_resolve_with_IIFE.html
├── 2-42_closer_example.html
├── 2-31_resolve_with_function.html
├── 2-37_using_with.html
├── 2-44_static_with_closer.html
├── 2-49_setInterval_closer.html
└── 2-51_closer_practical_example.html
├── chapter-3
├── 3-84_how_to_use_global.html
├── 3-80_access_global_through_window.html
├── 3-76_global_variables.html
├── 3-69_add_function_prototype.html
├── 3-83_access_global_function.html
├── 3-96_checking_uninitialized.html
├── 3-83_set_global_function.html
├── 3-69_global_variable.html
├── 3-72_xhr2.js
├── 3-81_accessing_global.html
├── 3-66_how_to_generate_a_string.html
├── 3-77_issue_from_global.html
├── 3-61_branch_variable_type.html
├── 3-63_create_object_with_new.html
├── 3-68_additional_property_on_strings.html
├── 3-91_var_inside_if.html
├── 3-93_collecting_var_definitions.html
├── 3-86_var_vs_no_var.html
├── 3-72_xhr1.js
├── 3-70_global_event_handler.html
├── 3-97_no_var_mistake.html
├── 3-78_variable_without_var.html
├── 3-84_redefining_window.html
├── 3-67_difference_between_strings.html
├── 3-99_collecting_var_minification.html
├── 3-98_multiple_var_minification.html
├── 3-100_avoiding_global.js
├── 3-70_global_xmlhttprequest.html
├── 3-74_async_request_issue.html
├── 3-64_instanceof_primitive_type.html
├── 3-102_javascript_inside_html.html
├── 3-103_split_javascript_and_html.html
├── 3-94_multiple_vars.html
├── 3-94_collecting_vars.html
├── 3-105_scope_chain.html
├── 3-82_how_to_loop_global.html
├── 3-110_set_style_variable.html
├── 3-108_shifting_scope_chain_to_local.html
└── 3-73_local_with_closer.html
├── chapter-9
├── 9-416_app.js
├── 9-400_destructuring_default_value.html
├── 9-384_let_const.js
├── 9-387_arrow_expression_context.js
├── 9-423_exponential.html
├── 9-420_promise.html
├── 9-413_binary_octal.html
├── 9-404_function_parameter_default.html
├── module.js
├── 9-408_yield_examples.html
├── 9-386_arrow_expression.js
├── 9-395_template_string_expression.html
├── 9-397_template_string_expression_analyze.html
├── 9-411_map_set.html
├── 9-412_weakmap_weakset.html
├── 9-385_let_and_var.js
├── 9-403_function_parameter.html
├── 9-406_yield.html
├── 9-417_proxy.html
├── 9-422_array_includes.html
├── 9-388_class.js
├── 9-405_fibonacci_for_of.html
├── 9-407_iterator.html
├── 9-418_symbol.html
├── 9-396_template_string_expression_multiline.html
├── 9-420_promise_flow_control.html
├── 9-409_iterator_flow_control.html
├── 9-415_typed_array.js
├── 9-401_destructuring_example.html
├── 9-399_destructuring.html
└── 9-390_object_expression.html
├── README.md
├── chapter-5
├── 5-240_adder_with_currying.html
├── 5-164_generating_module.js
├── 5-236_self_invoking_constructor.html
├── 5-221_compatibility_for_xmlhttprequest.html
├── 5-162_simple_module.html
├── 5-215_check_ie_version.html
├── 5-179_setting_listener_separately.js
├── 5-222_compatibility_with_init_time_branching.html
├── 5-241_adding_currying_function_prototype.html
├── 5-237_callback_pattern.html
├── 5-224_xmlhttprequest_with_self_defining_function.html
├── 5-180_setting_listener_delegate.js
├── 5-200_backup_wrapped_function_with_proxy.html
├── 5-220_compatibility_for_standard.html
├── 5-230_cache_with_memoization.html
├── 5-197_wrapper_with_proxy.html
├── 5-227_prevent_duplicate_request.html
├── 5-219_compatibility_with_function.html
├── 5-242_unit_translate_with_currying.html
├── 5-243_xmlhttprequest_currying.html
├── 5-202_log_with_proxy.html
├── 5-232_fibbonacci_wth_memoization.html
├── 5-229_adding_cache.html
├── 5-199_same_name_wrapper_with_proxy.html
├── 5-217_compatibility_with_browser.html
├── 5-233_memoization_with_function_prototype.html
├── 5-181_event_delegate_with_id.html
├── 5-187_proxy_with_event_delegation.html
├── 5-184_event_delegate_test_bubbling.html
├── 5-194_aggregating_requests_with_proxy.html
├── 5-225_initialization_with_self_defining_function.html
├── 5-212_decorator_with_proxy_for_monitoring.html
├── 5-208_decorator_for_object.html
├── 5-188_data_collection_with_proxy.html
├── 5-191_cache_with_proxy.html
├── 5-204_form_validate_decorator.html
├── 5-168_event_bubbling_capturing.html
└── 5-174_modify_dom_propagation_path.html
└── chapter-8
├── 8-365_open_bracket_newline.html
└── 8-379_makefile
/chapter-7/Korean.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/unikys/javascript_in_depth/HEAD/chapter-7/Korean.png
--------------------------------------------------------------------------------
/chapter-7/flags.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/unikys/javascript_in_depth/HEAD/chapter-7/flags.png
--------------------------------------------------------------------------------
/chapter-7/Chinese.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/unikys/javascript_in_depth/HEAD/chapter-7/Chinese.png
--------------------------------------------------------------------------------
/chapter-7/English.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/unikys/javascript_in_depth/HEAD/chapter-7/English.png
--------------------------------------------------------------------------------
/chapter-7/Japanese.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/unikys/javascript_in_depth/HEAD/chapter-7/Japanese.png
--------------------------------------------------------------------------------
/chapter-7/loading.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/unikys/javascript_in_depth/HEAD/chapter-7/loading.gif
--------------------------------------------------------------------------------
/chapter-7/large_image.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/unikys/javascript_in_depth/HEAD/chapter-7/large_image.jpg
--------------------------------------------------------------------------------
/chapter-7/my_important_image.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/unikys/javascript_in_depth/HEAD/chapter-7/my_important_image.jpg
--------------------------------------------------------------------------------
/chapter-7/not_important_image.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/unikys/javascript_in_depth/HEAD/chapter-7/not_important_image.jpg
--------------------------------------------------------------------------------
/chapter-6/notice_list.json:
--------------------------------------------------------------------------------
1 | ["Link to the first article", "Link to the second article", "Link to the third article", "Link to the last article"]
2 |
--------------------------------------------------------------------------------
/chapter-4/4-146_original_object_create.js:
--------------------------------------------------------------------------------
1 |
2 | Object.create = function (o) {
3 | function F() {}
4 | F.prototype = o;
5 | return new F();
6 | }
7 |
8 |
--------------------------------------------------------------------------------
/chapter-2/2-26_testing_function_scope.html:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/chapter-3/3-84_how_to_use_global.html:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/chapter-3/3-80_access_global_through_window.html:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/chapter-3/3-76_global_variables.html:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/chapter-9/9-416_app.js:
--------------------------------------------------------------------------------
1 | import getURL, * from "module.js"
2 | getJSON("/getJSON", function (json) {
3 | console.log(json);
4 | });
5 | getURL("/getURL", function (data) {
6 | console.log(data);
7 | });
8 |
9 |
--------------------------------------------------------------------------------
/chapter-3/3-69_add_function_prototype.html:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/chapter-3/3-83_access_global_function.html:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/chapter-3/3-96_checking_uninitialized.html:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/chapter-9/9-400_destructuring_default_value.html:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
--------------------------------------------------------------------------------
/chapter-6/6-297_dom_reflow_inside_loop.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | var i,
4 | tags = document.getElementByTagName("div"),
5 | length = tags.length;
6 |
7 | for (i = 0 ; i < length ; i++) {
8 | console.log(tags[i].offsetWidth + " , " tags[i].clientHeight);
9 | }
10 |
--------------------------------------------------------------------------------
/chapter-7/sleep.js:
--------------------------------------------------------------------------------
1 | (function () {
2 | sleep(5000);
3 |
4 | function sleep(waitMilliseconds) {
5 | var waitUntil = Date.now() + waitMilliseconds;
6 | while(Date.now() < waitUntil) {
7 | ;
8 | }
9 | }
10 | }());
11 |
--------------------------------------------------------------------------------
/chapter-3/3-83_set_global_function.html:
--------------------------------------------------------------------------------
1 |
2 |
14 |
--------------------------------------------------------------------------------
/chapter-4/4-114_new_with_function.html:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/chapter-9/9-384_let_const.js:
--------------------------------------------------------------------------------
1 | let myObject = {
2 | name: "unikys",
3 | say() {
4 | alert("My name is " + this.name);
5 | }
6 | };
7 |
8 | myObject.say();
9 | const constString = "This is a constant";
10 | constString = "This will raise an error"; // Error!
11 |
12 |
--------------------------------------------------------------------------------
/chapter-2/2-39_obscure_with.html:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/chapter-4/4-115_new_with_class.html:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/chapter-3/3-69_global_variable.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/chapter-2/2-27_testing_with_scope.html:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # javascript_in_depth
2 | 속깊은 자바스크립트 예제 소스
3 |
4 |
5 | * 1장 웹과 자바스크립트
6 | * 2장 자바스크립트의 스코프와 클로저
7 | * 3장 자바스크립트의 변수
8 | * 4장 프로토타입과 객체지향, 그리고 상속
9 | * 5장 디자인 패턴 실용
10 | * 6장 브라우저 환경에서의 자바스크립트
11 | * 7장 자바스크립트 성능과 사용자 경험 개선
12 | * 8장 자바스크립트 코딩과 개발 환경
13 | * 9장 자바스크립트 표준
14 | * 10장 자바스크립트 프레임워크
15 |
--------------------------------------------------------------------------------
/chapter-7/7-316_script_at_bottom.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | I need to show this important information as fast as possible
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/chapter-3/3-72_xhr2.js:
--------------------------------------------------------------------------------
1 | (function () {
2 | xhr = new XMLHttpRequest();
3 | xhr.open("GET", "http://unikys.tistory.com/api");
4 | xhr.onreadystatechange = function () {
5 | if (xhr.readyState === 4 && xhr.status === 200) {
6 | console.log(xhr.responseText);
7 | }
8 | };
9 | }());
10 |
--------------------------------------------------------------------------------
/chapter-9/9-387_arrow_expression_context.js:
--------------------------------------------------------------------------------
1 |
2 | var name = "Global"; function Person() {
3 | this.name = "Unikys"
4 | setTimeout(() => alert("My name is " + this.name), 100);
5 | setTimeout(function () {
6 | alert("Global name is " + this.name);
7 | }, 100);
8 | }
9 | var person = new Person();
10 |
--------------------------------------------------------------------------------
/chapter-3/3-81_accessing_global.html:
--------------------------------------------------------------------------------
1 |
12 |
13 |
--------------------------------------------------------------------------------
/chapter-4/4-155_object_create_shim.js:
--------------------------------------------------------------------------------
1 | (function () {
2 | if (!Object.create) {
3 | Object.create = (function () {
4 | function F() {}
5 | return function (o) {
6 | F.prototype = o;
7 | return new F();
8 | }
9 | }());
10 | }
11 | }());
12 |
--------------------------------------------------------------------------------
/chapter-2/2-26_testing_catch_scope.html:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/chapter-2/2-40_alternative_style_settings.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Alternative style settings
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/chapter-3/3-66_how_to_generate_a_string.html:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/chapter-3/3-77_issue_from_global.html:
--------------------------------------------------------------------------------
1 |
17 |
--------------------------------------------------------------------------------
/chapter-2/2-41_closer_example.html:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/chapter-3/3-61_branch_variable_type.html:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/chapter-9/9-423_exponential.html:
--------------------------------------------------------------------------------
1 |
2 |
14 |
--------------------------------------------------------------------------------
/chapter-6/6-297_inefficient_dom_reflow.js:
--------------------------------------------------------------------------------
1 | This div will be increased
2 |
3 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/chapter-3/3-63_create_object_with_new.html:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/chapter-7/7-312_script_in_head.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | This title will not show during the sleep
6 |
7 |
8 |
9 | I need to show this important information as fast as possible
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/chapter-9/9-420_promise.html:
--------------------------------------------------------------------------------
1 |
15 |
16 |
--------------------------------------------------------------------------------
/chapter-9/9-413_binary_octal.html:
--------------------------------------------------------------------------------
1 |
14 |
15 |
--------------------------------------------------------------------------------
/chapter-3/3-68_additional_property_on_strings.html:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/chapter-3/3-91_var_inside_if.html:
--------------------------------------------------------------------------------
1 |
17 |
--------------------------------------------------------------------------------
/chapter-3/3-93_collecting_var_definitions.html:
--------------------------------------------------------------------------------
1 |
17 |
--------------------------------------------------------------------------------
/chapter-2/2-25_testing_block_scope.html:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/chapter-2/2-45_closer_easy_example.html:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/chapter-5/5-240_adder_with_currying.html:
--------------------------------------------------------------------------------
1 |
2 |
17 |
--------------------------------------------------------------------------------
/chapter-3/3-86_var_vs_no_var.html:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/chapter-3/3-72_xhr1.js:
--------------------------------------------------------------------------------
1 | var element = document.getElementById("div"),
2 | button = document.getElementById("button"),
3 |
4 | xhr = new XMLHttpRequest();
5 | button.onclick = function () {
6 | xhr.open("GET", "http://unikys.tistory.com/");
7 | xhr.onreadystatechange = function () {
8 | if (xhr.readyState === 4 && xhr.status === 200) {
9 | element.innerHTML = xhr.responseText;
10 | }
11 | };
12 | xhr.send();
13 | };
14 |
--------------------------------------------------------------------------------
/chapter-5/5-164_generating_module.js:
--------------------------------------------------------------------------------
1 |
2 | (function (windows, undefined) {
3 |
4 | var _myLibrary = window.myLibrary;
5 |
6 | if (!_myLibrary) {
7 | _myLibrary = {};
8 | }
9 | if (!_myLibrary.unikys) {
10 | _myLibrary.unikys = {};
11 | }
12 |
13 | _myLibrary.unikys.sayHello = function () {
14 | alert("Hello, my name is Unikys");
15 | };
16 |
17 | window.myLibrary = _myLibrary;
18 |
19 | }(window));
20 |
21 |
--------------------------------------------------------------------------------
/chapter-4/4-147_object_create_inheritance.html:
--------------------------------------------------------------------------------
1 |
19 |
--------------------------------------------------------------------------------
/chapter-3/3-70_global_event_handler.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Global event handler example
4 |
5 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/chapter-4/4-149_object_create_initialize.html:
--------------------------------------------------------------------------------
1 |
21 |
--------------------------------------------------------------------------------
/chapter-7/7-352_separated_flags.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
Korean
13 |
English
14 |
Chinese
15 |
Japanese
16 |
17 |
18 |
--------------------------------------------------------------------------------
/chapter-3/3-97_no_var_mistake.html:
--------------------------------------------------------------------------------
1 |
18 |
--------------------------------------------------------------------------------
/chapter-5/5-236_self_invoking_constructor.html:
--------------------------------------------------------------------------------
1 |
2 |
18 |
--------------------------------------------------------------------------------
/chapter-2/2-22_scope_issue.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Click me! DIV 0
4 | Click me! DIV 1
5 | Click me! DIV 2
6 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/chapter-3/3-78_variable_without_var.html:
--------------------------------------------------------------------------------
1 |
20 |
--------------------------------------------------------------------------------
/chapter-9/9-404_function_parameter_default.html:
--------------------------------------------------------------------------------
1 |
2 |
17 |
--------------------------------------------------------------------------------
/chapter-3/3-84_redefining_window.html:
--------------------------------------------------------------------------------
1 |
20 |
--------------------------------------------------------------------------------
/chapter-9/module.js:
--------------------------------------------------------------------------------
1 | export function getJSON(url, callback) {
2 | var xhr = new XMLHttpRequest();
3 | xhr.open("GET", url, true);
4 | xhr.onload = function () {
5 | callback(JSON.parse(this.responseText));
6 | };
7 | xhr.send();
8 | }
9 |
10 | export default function (url, callback) {
11 | var xhr = new XMLHttpRequest();
12 | xhr.open("GET", url, true);
13 | xhr.onload = function () {
14 | callback(this.responseText);
15 | };
16 | xhr.send();
17 | }
18 |
--------------------------------------------------------------------------------
/chapter-2/2-35_understanding_with.html:
--------------------------------------------------------------------------------
1 |
17 |
--------------------------------------------------------------------------------
/chapter-4/4-135_avoiding_prototype.html:
--------------------------------------------------------------------------------
1 |
19 |
20 |
--------------------------------------------------------------------------------
/chapter-4/4-116_calling_function.html:
--------------------------------------------------------------------------------
1 |
23 |
--------------------------------------------------------------------------------
/chapter-4/4-140_prototype_inheritance.html:
--------------------------------------------------------------------------------
1 |
21 |
--------------------------------------------------------------------------------
/chapter-5/5-221_compatibility_for_xmlhttprequest.html:
--------------------------------------------------------------------------------
1 |
2 |
18 |
--------------------------------------------------------------------------------
/chapter-9/9-408_yield_examples.html:
--------------------------------------------------------------------------------
1 |
20 |
21 |
--------------------------------------------------------------------------------
/chapter-4/4-140_object_inheritance.html:
--------------------------------------------------------------------------------
1 |
20 |
--------------------------------------------------------------------------------
/chapter-4/4-154_class_extends.html:
--------------------------------------------------------------------------------
1 |
22 |
--------------------------------------------------------------------------------
/chapter-5/5-162_simple_module.html:
--------------------------------------------------------------------------------
1 |
21 |
--------------------------------------------------------------------------------
/chapter-2/2-28_resolve_with_with.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Click me! DIV 0
4 | Click me! DIV 1
5 | Click me! DIV 2
6 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/chapter-9/9-386_arrow_expression.js:
--------------------------------------------------------------------------------
1 | let myFunc = () => alert("This is a new function literal");
2 | myFunc();
3 |
4 | var myFuncES5 = function () {
5 | alert("This is a new function literal");
6 | };
7 | myFuncES5();
8 |
9 |
10 |
11 | let paramFunc = (greetings, name) => {
12 | alert(greetings + " , " + name);
13 | }
14 | paramFunc("Hello", "World");
15 |
16 |
17 | var paramFuncES5 = function (greetings, name) {
18 | alert(greetings + " , " + name);
19 | }
20 | paramFuncES5("Hello", "World");
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/chapter-9/9-395_template_string_expression.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Name:
5 |
6 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/chapter-2/2-32_resolve_with_IIFE.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Click me! DIV 0
4 | Click me! DIV 1
5 | Click me! DIV 2
6 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/chapter-4/4-153_object_create_with_new.html:
--------------------------------------------------------------------------------
1 |
21 |
22 |
--------------------------------------------------------------------------------
/chapter-9/9-397_template_string_expression_analyze.html:
--------------------------------------------------------------------------------
1 |
2 |
17 |
--------------------------------------------------------------------------------
/chapter-3/3-67_difference_between_strings.html:
--------------------------------------------------------------------------------
1 |
18 |
--------------------------------------------------------------------------------
/chapter-4/4-114_new_with_java.java:
--------------------------------------------------------------------------------
1 | class Person { String name; String blog;
2 | public Person(String name, String blog) {
3 | this.name = name;
4 | this.blog = blog;
5 | }
6 |
7 | public String getName(String name) {
8 | this.name = name;
9 | }
10 | public String getBlog(String blog) {
11 | this.blog = blog;
12 | }
13 |
14 | public void main(String [] args) {
15 | Person unikys = new Person("unikys", "unikys.tistory.com");
16 | System.out.println(unikys.getName());
17 | }
18 | }
19 |
20 |
--------------------------------------------------------------------------------
/chapter-2/2-42_closer_example.html:
--------------------------------------------------------------------------------
1 |
23 |
--------------------------------------------------------------------------------
/chapter-9/9-411_map_set.html:
--------------------------------------------------------------------------------
1 |
21 |
--------------------------------------------------------------------------------
/chapter-9/9-412_weakmap_weakset.html:
--------------------------------------------------------------------------------
1 |
27 |
--------------------------------------------------------------------------------
/chapter-4/4-150_object_create_configure.html:
--------------------------------------------------------------------------------
1 |
27 |
--------------------------------------------------------------------------------
/chapter-2/2-31_resolve_with_function.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Click me! DIV 0
4 | Click me! DIV 1
5 | Click me! DIV 2
6 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/chapter-9/9-385_let_and_var.js:
--------------------------------------------------------------------------------
1 | if (true) {
2 | var varVariable = 1;
3 | let letVariable = 2;
4 | }
5 |
6 | console.log(varVariable); // === 1
7 | console.log(letVariable); // Uncaught Reference Error
8 |
9 | let myArray = [0,1,2,3,4,5],
10 | length = myArray.length;
11 |
12 | for (let i = 0 ; i < length ; i++) {
13 | if (myArray[i] > 3) {
14 | break;
15 | }
16 | }
17 | console.log(myArray[i]);
18 |
19 |
20 | var duplicatedName = "This is with var";
21 | var duplicatedName = "No problem";
22 | let duplicatedName = "Syntax error will be raised"; // Error
23 |
24 |
--------------------------------------------------------------------------------
/chapter-9/9-403_function_parameter.html:
--------------------------------------------------------------------------------
1 |
2 |
22 |
23 |
--------------------------------------------------------------------------------
/chapter-9/9-406_yield.html:
--------------------------------------------------------------------------------
1 |
25 |
--------------------------------------------------------------------------------
/chapter-5/5-215_check_ie_version.html:
--------------------------------------------------------------------------------
1 |
21 |
--------------------------------------------------------------------------------
/chapter-7/7-353_image_sprite.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
20 |
21 |
22 |
Korean
23 |
English
24 |
Chinese
25 |
Japanese
26 |
27 |
28 |
--------------------------------------------------------------------------------
/chapter-4/4-139_early_inheritance.html:
--------------------------------------------------------------------------------
1 |
26 |
--------------------------------------------------------------------------------
/chapter-9/9-417_proxy.html:
--------------------------------------------------------------------------------
1 |
26 |
--------------------------------------------------------------------------------
/chapter-9/9-422_array_includes.html:
--------------------------------------------------------------------------------
1 |
24 |
--------------------------------------------------------------------------------
/chapter-3/3-99_collecting_var_minification.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/chapter-5/5-179_setting_listener_separately.js:
--------------------------------------------------------------------------------
1 |
2 | (function () {
3 | var x, y, cell;
4 | for (x = 0; x < 100; x++) {
5 | for (y = 0; y < 100; y++) {
6 | cell = document.getElementById("cell" + ("0" + x).substr(-2) + ("0" + y).substr(-2));
7 | cell.onmouseover = function () {
8 | this.style.backgroundColor = "#EEEEEE";
9 | };
10 | cell.onmouseover = function () {
11 | this.sytle.backgroundColor = "#FFFFFF";
12 | };
13 | cell.onclick = function () {
14 | alert(this.innerHTML);
15 | };
16 | }
17 | }
18 | }());
19 |
20 |
--------------------------------------------------------------------------------
/chapter-3/3-98_multiple_var_minification.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/chapter-9/9-388_class.js:
--------------------------------------------------------------------------------
1 |
2 | class Car {
3 | constructor(name) {
4 | this.name = name;
5 | this.type = "Car";
6 | }
7 | getName() {
8 | return this.name;
9 | }
10 | }
11 | let car = new Car("My car");
12 | console.log("car.getName(): " + car.getName());
13 |
14 |
15 | class SUV extends Car {
16 | constructor(name) {
17 | super(name);
18 | this.type = "SUV";
19 | }
20 | }
21 |
22 | let suv = new SUV("My SUV");
23 | console.log("suv instanceof SUV: " + (suv instanceof SUV));
24 | console.log("suv instanceof Car: " + (suv instanceof Car));
25 | console.log("suv.getName(): " + suv.getName());
26 | console.log(SUV);
27 |
28 |
--------------------------------------------------------------------------------
/chapter-3/3-100_avoiding_global.js:
--------------------------------------------------------------------------------
1 |
2 | // With IIFE / Closure
3 | (function () {
4 | var localVariable = "I'm not global";
5 | }());
6 |
7 |
8 | // With module
9 | var myModule = (function () {
10 | var localVariable = "I'm an inside local variable";
11 | return {
12 | show: function () {
13 | alert(localVariable);
14 | }
15 | };
16 | }());
17 |
18 | myModule.show();
19 |
20 |
21 |
22 | (function (window) {
23 | var localVariable = "I'm an inside local variable";
24 |
25 | window.myModule = {
26 | show: function () {
27 | alert(localVariable);
28 | }
29 | };
30 | }(window));
31 |
32 | myModule.show();
33 |
--------------------------------------------------------------------------------
/chapter-2/2-37_using_with.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Using with
4 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/chapter-6/6-304_web_worker.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/chapter-9/9-405_fibonacci_for_of.html:
--------------------------------------------------------------------------------
1 |
25 |
26 |
--------------------------------------------------------------------------------
/chapter-3/3-70_global_xmlhttprequest.html:
--------------------------------------------------------------------------------
1 |
3 | Global XMLHttpRequest example
4 |
5 |
20 |
21 |