Random Topics For Developers Which Aren’t Escapable…

Azim Uddin Ahamed
3 min readNov 3, 2020
  1. Here , I am going to shortly discuss about values.

Basically , there are two categories of value. First of two , referred to primitive values . Second one is divided into two which they are Objects and Function.

If we combine the two types of value. We get , there are nine types of value. They have special purposes . Before we declared that Primitive values.

  • Undefined(undefined) this used for if there is no values or unintentionally missing.
  • Null(null) This primitive is used for if there values is intentionally missing .
  • Booleans(true or False) This used for logical operator . this can be positive or negative or 1 or 0.Thus , we can count only two of condition.
  • Number(-122,2, pi and others) These numbers used for various kind of mathematical operation.
  • String(“hello”, “There”) Used for text and Array or Object etc.
  • Symbols(uncommon) used to hide some secret or special values .
  • BigInts(uncommon and new) Used for big operational number .
  • Objects({}, and other array) Used to make or get data from a group of data.
  • Functions(x=> x * 2) this function used for a special task which is related all of above types of values .

2.Balancing Cache In Server Site and Client Site For Developers.

What is caching?……

In online Spaces , we use some data for a particular website so that we can get a better services from the website , so that if we call this data again and again that means we requesting for our data in time. So ,there is an option that we can store our data with sending to server , but for requesting purposes , we can get through fast from the browser stored data . this is called Cache.

3 . Why we need Cache?

To the API, this request looks like this:

The client makes a request to the API.
This request is received by the server.
The server checks for a local copy of the file requested. While this check has a cost, the cost is still extremely low compared to the actual cost of computing a massive database check or generating content.
If the local resource exists, the server responds with its resource URI.
The client grabs the cached content.
If the local resource does not exist, the request is processed normally.

4. What is Block Binding?

For a long time now, declaring variables using the standard var keyword was commonplace in JavaScript. While super easy to use, it was not without its limitations. For one, it created an issue with ‘hoisting’. Any variable declared within a function, or within the global score, was ‘hoisted’ up to the top of function (or global scope). Which meant that variables within smaller code-blocks, such as if-else statements or for loops, were not actually local to those blocks.

There are two types of block bindings,

Let Method

The let declaration gives us true ‘block-level’ scope for our variables for the first time.

function func1()
{
for (let i = 0; i < 10; i++)
{
let term= 10;
}

console.log(term); // would result in an error
}

Const method

We also now have the ‘const’ declaration to further restrict how variables are treated and modified. With the ‘const’ declaration, variables can not be modified once they have been initialized. This is ideal for static values, such as Pi or for any other constants that you know for a fact can not be changed

const pi = 3.14;

pi = 5; // error

--

--