Sharing my thoughts, discussing my projects, and traveling the world.
Contact: @borz
Last updated 4 days, 20 hours ago
Telegram stands for freedom and privacy and has many easy to use features.
Last updated 2 months, 1 week ago
Official Graph Messenger (Telegraph) Channel
Download from Google Play Store:
https://play.google.com/store/apps/details?id=ir.ilmili.telegraph
Donation:
https://graphmessenger.com/donate
Last updated 3 months, 4 weeks ago
JavaScript Cheat Sheet: The Advanced Concepts ??
A handy reference to help all web developers learn and remember common JavaScript concepts.
7 JavaScript Tips & Tricks That No One Teaches ?
JavaScript is no doubt one of the coolest languages in the world and is gaining more and more popularity day by day. So the developer community has found some tricks and tips after using JS for quite a while now.
Functional Inheritance
Functional inheritance is the process of receiving features by applying an augmenting function to an object instance. The function supplies a closure scope which you can use to keep some data private. The augmenting function uses dynamic object extension to extend the object instance with new properties and methods.
They look like: https://pastebin.com/eLLUrCZ0
.map() Substitute
.map()
also has a substitute that we can use which is .from()
: https://pastebin.com/cZYe8Dkr
Number to string/string to number
Usually, to convert a string to a number, we use something like this: https://pastebin.com/pfVybUws
and to convert a string to a number, we use: https://pastebin.com/G2WnqaTP
but what we can use to code fast is: https://pastebin.com/fUFYQKa1
Using length to resize and emptying an array
In JavaScript, we can override a built-in method called length and assign it a value of our choice.
Let's look at an example: https://pastebin.com/zjuc3L36
It can also be used in emptying an array, like this: https://pastebin.com/9tWmq0T9
Swap Values with Array Destructuring
The destructuring assignment syntax is a JavaScript expression that makes it possible to unpack values from arrays, or properties from objects, into distinct variables. We can also use that to swap values fast, like this: https://pastebin.com/DfrYjkz6
Remove duplicates from an Array
This trick is pretty simple. Let's say, I made an array that is containing numbers, strings, and booleans, but the values are repeating themselves more than once and I want to remove the duplicates. So what I can do is: https://pastebin.com/QJAsY9a4
Short For Loop
You can write less code for a loop like this: https://pastebin.com/UxwtuDhd
Blotter.js
A #JavaScript API for creating interesting text effects. Powered by Three.js and Underscore.js.
JavaScript — Understand Arrow Function Syntax
Almost three years after arrow functions were added to #JavaScript *, they remain to be one of the most asked about features of the language.
In this article we’ll explore the shorter syntax of arrow functions and compare them to their equivalent function expressions. Ultimately, we’ll end up with two rules for understanding Arrow function syntax.*
5 Practical Ways To Share Code: From NPM To Lerna And Bit
*Sharing common code between projects and repositories is a key factor for better modularity and faster development, but it’s also complicated.
Here you can read a practical overview of 5 methods for sharing code between these repos and projects for 2018.*
⚡️ Weex: Review and Comparison with React Native
*In the last year, React Native - a truly brilliant creation of the Facebook team - has become one of the most discussed frameworks for cross-platform development. This is not surprising: applications created with RN have a completely native look (in comparison with hybrid ones, such as Ionic, ExtJS or NativeScript) and, in addition, their speed is not limited by the browser wrapper.
Up to a certain point, there were no actual rivals. We could not find something as fast and easy to use, which could also boast an arsenal of tools to create cross-platform software. This situation lasted quite a long time until the team of developers behind the Chinese eCommerce giant - Alibaba - started developing their own project called Weex. One of its grand benefits is its complete compatibility with VueJS front-end framework.
In this article, we will discuss whether this framework has succeeded in becoming an efficient cross-platform framework and why many developers consider it a worthy competitor to the super-advanced and rapidly growing React Native.*
Implementing #JavaScript Functors and Monads
*This concepts are very used nowadays on functional programing, but because of the heavy mathematical background, sometimes it may be confusing to understand all the definitions.
In this post I’ll try to clear a little more the understatement of this subject, but not going too deep and using simple examples, helping you to create your own functors and monads. I wish you enjoy it!*
? Read it
Medium
Implementing JavaScript Functors and Monads
Introduction
Sharing my thoughts, discussing my projects, and traveling the world.
Contact: @borz
Last updated 4 days, 20 hours ago
Telegram stands for freedom and privacy and has many easy to use features.
Last updated 2 months, 1 week ago
Official Graph Messenger (Telegraph) Channel
Download from Google Play Store:
https://play.google.com/store/apps/details?id=ir.ilmili.telegraph
Donation:
https://graphmessenger.com/donate
Last updated 3 months, 4 weeks ago