let and const are hoisted to the top of the block they
are in but not initialized to the default undefined value so
we can not use them until they are declared.
If we do,RerefenceError is thrown.
Variables declared using var can be accessed before they are declared and are equal to undefined.
Remember hoisting means declarations are moved to the top of their scope not the initialization.
Category: My thinking
Let, Const, Var in Javascript
Let and Const have block scope , Var has function scope.
We cant reassign new values to the variables created using “const”
Another rule is that unlike var, a let variable cannot be re- declared within its scope.
What’s the Difference Between IAM Roles and IAM Policies in AWS?
Policy : Policy define permission of aws identity(users, group, roles) or resource within the aws account. Policy ensure that only the authorized usrs have access to specific asstes. Permissions defined within a policy either allow or deny access for the user to perform an action on a specific resource.
A policy can be identity based or resuorce based. Identity-based policies are attached to an identity (a user, group, or role) and ensure the permissions of that specific identity. On the other hand a resource-based policy defines the permissions around the specific resource—by specifying which identities have access to a specific resource and when.
Role : Role are designed so that a set of permissions can easily be assign to users on an individual basis. For example, instead of assigning an individual all their necessary permissions one at a time, they can be assigned a specific role that contains all the necessary permissions in a single step.
When to use NoSQL(MongoDB)
If you find
- Your application requires super-low latency.
- Your data are unstructured, or you do not have any relational data.
- You only need to serialize and deserialize data (JSON, XML, YAML, etc.).
- You need to store a massive amount of data.
What is skill?
Skill depend on how you measure it.