Tagged “advanced”
-
TIL not using try/catch block with promises for error catching promises javascript advanced errorcatching
You shouldn't use a try/catch block inside the Promise Definition. Your promise is already doing that.
-
TIL using proxies for reactivity proxy advanced javascript
A Proxy let you detect when someone gets, sets, or updates a property on an object, and run code when they do. But why? This usecase -- when you add/update the object, it also updates localStorage!
-
TIL the difference between partial application and currying advanced javascript closure
Partial application transforms a function into another function with smaller set of arguments. Currying creates nesting functions according to the number of the arguments of the function. Each function receives an argument.
-
TIL how to convert a Callback to a Promise callback promises advanced
Callback functions work well for simple asynchronous operations, but can become difficult to manage and lead to 'callback hell' when dealing with more complex operations. Promises follow a specific pattern.
-
TIL A practical Curry Example curry advanced javascript
Currying is a programming technique where you take a function with multiple arguments, and you turn it into smaller sequential functions where you pass one argument at a time. But many use-cases kinda suck
-
TIL use-cases for Generators in Javascript advanced javascript mdn
Generators are functions that can be exited and later re-entered. Their context (variable bindings) will be saved across re-entrances.
-
TIL Memoization performance advanced javascript performance
Memorization in a nutshell: You catch the data if it exists already.
-
TIL Why use Closures javascript freecodecamp advanced
Now you might be asking, why even use it? Why not just flatten it out so it's just one function with one return statement?
-
TIL refactoring object lookups to avoid looking at the prototype chain advanced javascript refactor mdn
Depending on your lookup method, you can access the prototype chain, which opens up some potential vulnerabilities or terrible side effects!
-
TIL about semaphores javascript advanced programming
A semaphore limits access to a resource to some number of consumers. Any new requests for the resource will get stalled until later, eventually to be handled.
-
TIL ES6 Proxy's apply method javascript mdn advanced
Using JavaScript proxies you can wrap an existing object and intercept access to its attributes or methods, even if they don’t exist. You can also redefine fundamental operations for that object.
-
TIL ES6 Proxy javascript mdn advanced codepen
Using JavaScript proxies you can wrap an existing object and intercept access to its attributes or methods, even if they don’t exist. You can also redefine fundamental operations for that object.
-
TIL about more examples of currying javascript advanced
Currying is nothing more than a way to transform functions that accept multiple parameters into a sequential list of functions that take only one parameter each.
-
TIL what Single Threaded & Non-blocking means in JS javascript advanced
Javascript is a single-threaded language. This means it has one call stack and one memory heap. Non-blocking means it'll read from top to bottom and throw anything async in the queue.
-
TIL about switching out of JS Classes and into JS Modules javascript oop classes advanced
A classes are just blueprints for creating objects. A class encapsulates data and functions that manipulate data. A module is a file that exports features, such as variables, objects, and functions, that can be used elsewhere.
-
TIL Vue's Render Function vue render advanced
A good example is that you want to generate a lot of list items, and writing them in the '<template>' section makes it look like spaghetti.
-
TIL solving the this keyword and it's execution context javascript advanced
The this keyword references the current execution context of the function from where you’re calling using it. If it's used in a regular function, a arrow function, or a method changes the execution context of this.
-
TIL Microtask Queue vs the Call Stack Queue advanced javascript
When everything is done from the 'Call Stack', the Event Loop finds some new tasks to go after. It'll dig through all the 'Microtasks queues', then in the 'Macrotasks queues'.
-
TIL all functions create a empty prototype object javascript classes advanced
When you create a function in JavaScript, it automatically creates an empty container called prototype for you to stick your methods into.
-
TIL hoisting based on function declarations & function expressions javascript advanced
Function declarations get hoisted on load. So you can use it anywhere. Function expressions do not. Neither are better than another
-
TIL Immediately Invoked Function Expression javascript advanced
This is a design pattern where you create a function expression that is immediately executed.
-
TIL Closure as a backpack javascript advanced
The Backpack concept is a mental model to think about how closure saves data behind the scenes.
See all tags.