DEV Community

Fatemin Supria
Fatemin Supria

Posted on

JavaScript talk

1.Call()
Call() method allows calling any function and arguments provided individually. The call() allows for the method belonging to one object to be assigned and called for the different objects.

2.Null:
JavaScript null is a primitive value. Its data type is an Object. Null is also a falsy value.To check a null value in JavaScript, use three equal operator(===).
3.Global variable:Global variable can access any function.It can declared outside the function.
var value=20;//global variable

function x(){

alert(value);

}

function y(){

alert(value);

}
4.local Variable:
Find the largest element of an array:
function largestName(myfriend){
var num = '';
for (var i = 0; i<myName.length; i++)
{
if (num.length < myName[i].length) {
num = myfriend[i];
}
}
return num;
}
largestName['mina', 'rina', 'cina', 'kina', 'longsimaa'];
5.Private variable:
A private variable is not accessible in the global scope. It is only visible in the current class.
6.closure: It is an internal copy of the environment. A variable in a closure is exclusively accessible to the child function that owns it.
7.setTimeout()
It is a method that calls a function or a specified number of ms in before an expression occur.

Syntex: setTimeout(function, milliseconds, param1, param2, ...)

8.setInterval()
SetInterval is continue calling a function.
syntex:setInterval(function, milliseconds, param1, param2, ...)
9.Js stack: stack function depend on last in first out theory.

10.Queue:
Queue is a process.Is the function is empty then its call a new function.

Top comments (0)