Async Callback:雖然程式碼是逐行執行,但是結果並沒有依序印出來,這個過程是因為非同步執行。我們運用「setTimeout」呼叫堆疊的方式,來模擬非...
Event loop:事件循環的功能就像是查看堆疊中的任務,如果堆疊是空的,他就會將第一個事件放到佇列上,並將接下來的事件往上疊加,讓堆疊能有效的執行。 Si...
LeetCode Js-88. Merge Sorted Array You are given two integer arrays nums1 and n...
LeetCode Js-35. Search Insert Position Given a sorted array of distinct integer...
LeetCode Js-169. Majority Element Given an array nums of size n, return the maj...
LeetCode Js-119. Pascal's Triangle II Given an integer rowIndex, return the row...
LeetCode Js-217. Contains Duplicate Given an integer array nums, return true if...
LeetCode Js-219. Contains Duplicate II Given an integer array nums and an integ...
LeetCode Js-58. Length of Last Word Given a string s consisting of words and sp...
LeetCode Js-1929. Concatenation of Array Given an integer array nums of length...