Today's Leetcode challenge involved filtered an array using a given function. This can be done manually, first by declaring a new array to store your return value. Then you increment through your given array, and if the current value satisfies the function you push it on to the new array and eventually return it. However, it is much more elegant to use the built in Array.filter() method. Here you simply pass in your function, and the handy filter method does the rest.
Subscribe to:
Post Comments (Atom)
190: Sablier
The CodeHawks platform has an upcoming audit on the Sablier protocol, so I decided to read through the docs and familiarize myself with the...
-
The CodeHawks platform has an upcoming audit on the Sablier protocol, so I decided to read through the docs and familiarize myself with the...
-
The ZKasino project recently exit scammed over 33 million dollars worth of Ethereum. he recent debacle surrounding ZKasino offers valuable...
-
In addition to its native SDK, Hedera also supports smart contracts in a platform compatible with the Ethereum Virtual Machine. This allows ...
No comments:
Post a Comment