DynamicPL/Javascript
-
Event Loop, Execution Stack, Web APIs, and Message QueueDynamicPL/Javascript 2019. 10. 23. 01:49
1. Overview Clarify the difference between synchronous and asynchronous in JavaScript. And see How these things to work deeply with Event Loop, Execution Stack, WEB APIs, and Message Queue. 2. Description 2.1 Synchronous One statement is processed after the other, line by line in a single thread in the JavaScript engine 2.2 Asynchronous Allow asynchronous functions to run in the background We pa..
-
Array OperationsDynamicPL/Javascript 2019. 9. 22. 09:05
1. Overview Summarize array operations, such as pop, push, shift, unshift, splice, slice, and split in javascript 2. Description var a = [1, 2, 3]; var b = a.unshift(0); console.log(a); //[0, 1, 2, 3] console.log(b); //4 var a = [1, 2, 3]; var b = a.shift(); console.log(a); //[2, 3] console.log(b); //1 var b = a.shift(2); console.log(a); //[3] console.log(b); //2, only one element is shifted var..