A. Basics:

  1. Proxy API helps in meta programming like Reflect API or Symbols.
  2. Meta-programming means that you’re able to change (parts of) the behaviour of the underlying language — JavaScript in this case. This of course is a powerful feature as it allows you to influence the way your code is executed.
  3. Suppose there is an object with some properties in it. A source code wants to access it

— in regular case directly access


Why ES6 — Reflect API is important? Let us understand it.

What is the Reflect API?

The Reflect API could be described as a collection or “central place” which houses all kind of object and function related functions (for creation, property management etc.). Some of the functionalities added on the Reflect object where available before on the Object object.

But the goal for the future is, to have on central place to store all those methods — the Reflect Object/ API.
Therefore, the Reflect API provides useful methods to create, manipulate and query objects and functions in your JavaScript project.

Some points to note:

  1. Reflect API deals with Meta programming.

Metaprogramming…


In JavaScript, developers often spend a lot of time deciding the correct data structure to use.This is because choosing the correct data structure can make it easier to manipulate that data later on, saving time.

We as developers generally use objects or array to store data. With ES6, there are two more ways to save data — Maps and Sets

1. Map

A Map is a key-value collection introduced in ES6. It kind of fills the gap between arrays (no key-value pairs) and objects (key-value pairs but much more complex than a simple collection).

  1. The Map object holds key-value pairs and remembers…


No matter how great we are at programming, sometimes our scripts have errors. They may occur because of our mistakes, an unexpected user input, an erroneous server response, and for a thousand other reasons.But there’s a syntax construct try..catch that allows us to “catch” errors so the script can, instead of dying, do something more reasonable.

eg1

lalala;     
// Error msg:ReferenceError: lalala is not defined - code dies here
// my next codes.
console.log('initiating a service'); // this code will break

with try-catch

try {lalala;} catch(err) {console.log(err.stack);   // this will throw in console}console.log('next codes'); //…

Comparison between prototypal inheritance and classical inheritance on multiple parameters. Is classical inheritance obsolete. How does JavaScript inherit objects. Battle between Java and JavaScript.

These questions have always bothered me. What is the difference between prototypal and classical inheritance? Is prototypal inheritance better than classical? If yes, then why?

Being a JavaScript enthusiast, my answer has always been biased towards prototypal inheritance. Then I did more research on it. And it turns out I was right.

Let’s understand those differences and reasons which makes prototypal inheritance better than classical.

First things first.

What is Prototypal and Classical inheritance?

Simply put…


→ Before deployment, React JS is bundled into a single file and deployed.

→ Bundling is great, but as your app grows, your bundle will grow too. Especially if you are including large third-party libraries. You need to keep an eye on the code you are including in your bundle so that you don’t accidentally make it so large that your app takes a long time to load.

→ When we are having an application, its bundle file keeps on growing. Instead of making a 25 MB file we can split it and divide the bundle size.

→ To avoid…


It’s not just about NODE JS. It is more about how far JavaScript can go?

These are some examples where JavaScript is taking place :

  • Windows and OS X Desktop Applications — Using Electron companies including Slack and Microsoft (Visual Studio Code) have used this Node tool set to create native applications.
  • iPhone and Android Applications — React Native now provides native-quality experiences for significant portions of Facebook’s mobile applications in addition to those of companies like CBS Sports, Vogue, and apparently Walmart in the near future.
  • Internet Of Things (iOT) — Javascript is now finding it’s way into production…

→ Angular 5 was announced to the world on 1st November, 2017

→ The previous version was Angular 4.4.0

→ This release focused on making Angular smaller and faster to use.

→ Created and maintained by Google

→ Front-end/Client Side JavaScript Framework

Features:

Modularity — all modules are maintained by different developers and easily maintained

Consistency — importing all package in angular standard and then using it

Maintainability, Productivity and ability to catch errors early.

→ Angular 5 is designed with better mobile support.

→ In Angular 5, “everything is component so it facilitated better code reuse.


Hello friends lets see how I developed this calculator step by step. I have shared the source code in the end:

  1. First install Angular latest CLI. For this open your teminal/command prompt: npm install -g @angular/cli
  2. Create a new angular project : ng new calculator
  3. Lets create a calculator component: ng n c calculator.
  4. app.module.ts

I have imported FormsModule and registered in imports of NgModule decorator. This is used for the ngModel binding


This is the concept we are using almost all the time with developers working in VCS. Let me share quickly concepts how to clone, pull in local repository and finally push in remote Github account.

Steps to follow:

  1. First clone the repository from github
  2. Go to the repository cloned and make some changes
  3. Push the changes back to the remote repository
  1. First clone the repository from github:

Go to your repository in github

→ Install git and make typing git should show description

→ Open terminal/command prompt type

git clone https://github.com/AmirMustafa/jwt-Authentication-with-Express-JS.git

Normally this is the same url of the browser…

Amir Mustafa

Web Artisan. Human — Engineering

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store