it returns undefined
user,groups,other
syntax errors-if we not follow the rules type errors - redeclaring of const variable gives type errors reference errors-trying to access before declaring
var is function scope let is block scope
global variables can be accessed from any where
cd .. -goes to previous directory cd/ goes to root directory
for in for objects for of for arrays
forEach does not return but console map returns new array
to add or delete or repalce existing we use splice
primitive means basic data types and immutable non primitive are array,objects and are mutuable
calling function as an argument
using {} ex:{matches,deliveries}
mv filename1 filename2
accumulator,currentvalue
to commit the files
3stages untracked,staging,commited
How do you check hidden files in a directory?
ls -a
it gives satisfied conditions objects
call by value-it creates new memory and does not effect original one call by reference - original one gets effected
== does not checks data type whereas === checks data type
array,objects
normal function with function keyword and arrow function without function keyword and used => this symbol
slice to get the certain range splice is add,remove or replace elements
message ,name
parent scope variables can be accessed function scope
process ids are retrieved
when we want not to change the value then we use const
function inside a function is called closures
either object or array or single value as per requirement
when having same file names with different content in it
split to divide the string as needed and join is used to combine by space or - etc
between the declaration and assignment
returns index
git remote -v
to access every element ,return is not possible, by using console we get data.
parameters is used for function declaration and arguments used for calling function
throws - It throws any value throw Error - throws errors
shallow copy upadating new one effects original one deep copy does not effects original one it creates new memory
temporarily stores changes
it checks every element if condition satified returns true othrwise false
push -elements added at end pop-remove elements from end
What is a higher-order function? It takes one or more functions as arguments and returns functions
What is the use case of [incomplete question]? What is the 'for...of' loop? for arrays,strings to iterate and access we use for of ,it is iterable function
it enables permission of user
To download data from remote repository
git commit -m "message"
copy means to copy contents from one file to other and move is to move from one directory to other
by using index
#What is the scope of 'let', 'var', and 'const'? let and const are block scope var is function scope
#What are template literals? backticks ,represent as multiline string without using \n
#What is the 'indexOf' method? gives the index of charcter in the string and it gives the index of element of array
#What is the return type of 'map'? creates new array object
#What are the disadvantages of shallow copy? The original object also it effects so that sometimes it may be lead unexpected behaviour
shift()-delete the first element of array unshift()-add the element to first position of array
to find public ip address
global scope-we can access the variables from anywhere if we declared globally local scope - we can only access variable to that block only if we declared locally
git init
git branch branchname
It gives undefined
If we want to pass the unknown number of arguments then we use spread operator ,representation of spread operator(...)
NaN is not a number ,It represents not a valid number and used to check whether number is valid or not
to get structure of directory
.entries()-used to convert object to array .fromEntries()-used to convert array to object
it takes output from previous one as input and process and gives output
mutuable methods - they modify the arrays -examples:push(),pop() immutable methods- they do not modify arrays but craetes new array -examples:map(),filter()
Array.from(),spread operator,slice() etc
read-only to read file-4 write-to modify the data or include data-2 execute-to execute-1
git merge-combining changes from one branch to another branch git rebase-moving changes from one branch onto other branch
It gives the first element which statisfies condition,if no element satisfies it gives undefined
for in,for of,while
no return type
pwd
it gives type for ex let n=3 => o/p:number
It converts into string
closure defined inside closure nothing but nested closure
no effect,it goes to next elemnt
git branch
to search for the specific content
git reset
key value pairs as array
passbyvalue- it will not effect the original one it creates the memory passbyreference-it will effect original array
create new instance of object
we can give console before declaring it gets undefined for var but for let it gets error
parseInt()
to check commit history
to get single value output
it should convert to array and then we can use it
to copy objects from one source to other object.assign(target,source)
isNumber()
pkill
try catch try catch finally
to get all ports
by manually opening the text file
for every character we having ascii value to get it charcodeAt()
touch or cat
network connectivity
we can access the variable before declaring
npm start
data representation javascript object notation
within the code block
number,string,boolean,Nan,undefined
undefined
it gives the value of satisfied condition
it check whether it is present or not,returns true or false
assign null to variable ex:let a= null undefined gets when not assigned value
to remove the spaces from first and last
if value not assigned is undefined if not declared any variable
push(),pop() -- we can change
7-->logical,assignment,ternary,bitwise,arthimetic,comparision,string
single conditional statement -condition ?truth value:falsevalue
return object
JSON.parseInt(JSON.stringify(name))
it creates new memory it does not effect the original one
{},dot(.) operator
to get the range of sentence (start,stop)
nslookup
yes because it is single thread
to give status of current working directory
map returns an new array filter returns new array of all satisfied condition
chmod
it gives the path of file which we given
sort() ex:let n=[4,5,2] n.(sort(a,b)=>(a-b))
to craete new one which will effect original if cahnges or done
shift-to delete the first element unshift - to add element to first position
single threaded
to initialize empty repoistory
to join two or more strings by using space,or any symbols we want
because it is synchronous
accumulator,currentvalue
callback function sort(a,b)=>a[1]-b[1]
chmod 745 filename
when we want to change the permissions of file