Key Web Security Terms
Common web security terms and concepts a frontend developer should know.…
Common web security terms and concepts a frontend developer should know.…
Create a function to turn any function into a "promisfied" function. Any function to be promisified will always have a callback as the last argument.…
How to use Promises in JavaScript to write asynchronous code. And how we can use Async and Await to help us write our async code in a sync style.…
Not every app or webpage needs to be done in React, Vue or the latest framework. Sometimes, you just need plain old HTML, CSS and JavaScript to get the job done. Here's a handy guide for DOM manipulation with Vanilla JS.…
There are four types of function visibility in Solidity: external, internal, private, and public.…
Assigning storage to memory is by value, i.e., value is copied over.Assigning memory to storage is also by value, i.e., value is copied over.…
modifier is used to declare some code that will be re-used throughout the contract. Write once, use everywhere. For example, instead of doing the require check on owner, declare this modifier: modifier onlyOwner { require(msg.sender == owner, "Only contract owner can do this"); _; // run the function } and can…
assert is used to check the contract's code for errors and make sure code runs like it's supposed to. Usually by testing certain invariants (an invariant is a condition that should always be true at a certain stage in the code). These are the cases when…