Posts

Showing posts from May, 2023

New Array Method In Javascript

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toSpliced https://www.youtube.com/watch?v=3CBD5JZJJKw   Array.prototype.with --> //mutablity ---> changing the orignal one const arr= ['Ankit','Tyagi','Teena','Anju'] arr.map((name,index)=>{   if(index===1) return 'Anand'   return name; }) console.log(arr) function then returns a new array with the results of the callback function. Array.with(index,value) Mutable --> We are changing the value of the Orignal Array or changing something const nameArr =['Ankit', 'Teena',' Anju',' Anand']; nameArr[1]='Someone'; console.log(nameArr) const newArr =[...nameArr]; newArr[1]='Someone'; Performance Issue--> we are looping through the array when we do [...nameArr] , we are again looping through the array newArr[1]='Someone'; when we assign the 2nd index some value Immutable --> We will create a copy ...

System Design

Image
 

Kubernetes

 Kubernetes is an orchestration tool for containers.      Helps manage containerized applications in different development environments. High availability and no downtime for the app. Scalability and higher performance. Disaster recovery -backup and restore. Opensource Made by Google. PODS - smallest unit, It has an IP address. once a POD dies it automatically recreates it with a new IP.layer over the container  Ingress Master Node controls the worker Node, worker Node has multiple containers running inside them.                                                                   Master Node                                                      ...

Git and Github

Image
Git and GitHub /bitbucket and Gitlab:- For Practice -->https://learngitbranching.js.org/ Git: Version control system Share your code Maintain the history of code changes, who, where, and when   Multiple people working on the same project .git --> hidden file, where all the history gets saved https://git-scm.com/download/win --> To Download Git write git in the cmd to check if it is installed properly git init --> to initialize git in that project or folder=> initialize empty git repository in the folder where you did git init now git will be like hey ankit you have some changes in your project please make sure to click a picture of it , so other people are aware that you made this change. pwd --> pgitrint working directory ls--> list all the folders mkdir  dirName--> make a directory with name dirName cd dirName --> change directory or come inside the dirName touch fileName.txt --> to create a file ls -a --> Show me the list of hidden file ls ....