@biplabmalakar
Nothing here yet.
Nothing here yet.
No blogs yet.
One best way of remembering whither call by value or call by reference is based on data type. Primitive data type parameter is called by value (number, string, boolean, null )and Reference type data are call by reference (array, object, function) unless I do something explicitely. I always remember this
Before es6 javascript have tow scope global and functional scope, not block scope. Means let consider snippet below function demo(){ a= 1; var b = 2; console.log(a,b);//1,2 } console.log(a,b);//1, undefined because a is consider as global scope of demo(), note this happen because of hosting and scope of b is within function. Now if you declare variable 'a' again then it will rewrite(scope of a is global). function demo(){ a= 1; var b = 2; console.log(a,b);//1,2 } var a = 2; console.log(a,b);//2, undefined if we write code like { var a = 10; } console.log(a);// 10 it means that a is not in the scope of {} this block means we don't have block scope. Now when let is introduce then JavaScript have the capability of block scope. Because let prevent the default JavaScript behavior of hosting. Like { let a = 10; console.log(a);//10 } console.log(a);// a is not declare error ==>>Now consider your code first snippet const cloudCount = () => { let i = 2; console.log(i); // 2 for (let i = 0; i < 10; i++) { console.log(i); // All numbers from 0 to 9 } }; here the scope of first 'i' is according to the code is global means anybody can use and scope of second 'i' is within loop, so here first 'i' and second 'i' is different and we can declare same variable multiple time in different scope. That is why no error. ==>>Now consider your code second snippet const cloudCount = () => { let i = 2; console.log(i); // 2 for (var i = 0; i < 10; i++) { console.log(i); // All numbers from 0 to 9 } }; here first 'i' was no problem to run, when come to var i and we know var does't have block scope it should be either global and function and for is not a function so that JavaScript try to host the variable 'i' means "put on the top". When JavaScript try to do this then it find that already variable is declare within a block scope(let). And let prevent to declare same variable multiple time in same scope. For that it gives error. And when we write code like const cloudCount = () => { var i = 2; console.log(i); // 2 for (var i = 0; i < 10; i++) { console.log(i); // All numbers from 0 to 9 } }; When var used to declare then if same variable is already present in same scope then it will rewrite again no problem. Means when second 'i' is declare with var then it will host and rewrite with first 'i' variable.
For that you can use Frontend- Angular4 Backend- Node.js Database- Mongodb Its impossible to say how to build because its a very big question. If you need any advise or guide then I will be happy to help you. For that you can mail me bapinmalakar383@gmail.com or call me 9592350924. I will be help you how to build step by step.
Node.js is best, because of handling request. Php is multi-thread-request model, means for each request its create thread to handle now if maximum thread limit exceed then your server not able to handle incoming request at that time,means incoming request to be wait for free thread. But if you using node.js then you can handle multiple request at a time on the principal of single-thread-request-model. Its done by concept of asynchronous. Here we have a toll known as eventloop which will accept each request are coming and process if no need of any I/O block, if so then it will transfer the work to a thread present in thread pool. By that eventloop become free for take new incoming request. Another thing is node.js is faster, because node.js by nature asynchronous means you can process your code without depend on another. Which lead faster execution of your code.
JavaScript support both. When first time JavaScript programme write then its goes to compile phase. In compile phase the main purpose is making execution context. In this context compiler make global execution context and context for each function and the memory allocation for variable in stack those are possible( here hosting concept is implement). After that code is moving forward for execution, and for that JavaScript used interpreter. Now interpreter execute each code line by line and make decision which is going to insert in execution context and which "function execution context" push into execution context and when when to pop item from execution context. So easy way to remember is compiler used for make call stack/ execution context and interpreter for perform operation on call stack by reading code.
I have a simple description which I remember always. Git have two area tracking and non-tracking area. When we run commit then it will process the files those are tracking area and this are known as staging area. Git stage is a area where files are under tracking of changes. Now when we create a file or changed the file then it will go under non-tracking area(non-staging), and if we make commit then those files changes are not traced and commit. For that we enter git add command, which move all files from non-staging area to staging area and then git able to trace the changes of those files.