Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

What does () = > mean in js?

/**
I think that you might be looking for 
the js "arrow function"; I hope that 
this example below helps ;)
**/ 

// usual function
function fartOne(){
    console.log('Pooofff... pof.. ppf.. poof.. p');
}

// arrow function to do the same
const fartTwo = () => console.log('Baaaf... paf.. poof.. poffie.. plop');

// call the functions to test 'em out..
fartOne();
fartTwo();
Comment

what does the ... mean in javascript

const x = [1,2,3,4,5];
Math.max(x) // NaN
Math.max(...x) // 5
// Math.max(...x) = Math.max(1,2,3,4,5)
Comment

PREVIOUS NEXT
Code Example
Javascript :: ... in javascript 
Javascript :: javascript static methods 
Javascript :: change text color according to background js 
Javascript :: empty array javascript 
Javascript :: sort function explained javascript 
Javascript :: javascript get date value from input 
Javascript :: javascript event.target 
Javascript :: array sort 
Javascript :: check if is array javascript 
Javascript :: reactnative timepicker 
Javascript :: mongodb find and update array item by id 
Javascript :: mongoose remove 
Javascript :: type js 
Javascript :: rest parameters javascript 
Javascript :: how to loop over dom objects javascript 
Javascript :: how to get nested array using lodash 
Javascript :: Auto increment in firebase realtime database 
Javascript :: date range picker jquery 
Javascript :: check if property has value in array javascript 
Javascript :: react native loop in render 
Javascript :: white with opacity rgba to hex 
Javascript :: requestanimationframe in javascript 
Javascript :: javascript advanced concepts 
Javascript :: js role giver 
Javascript :: sort array with negative numbers 
Javascript :: hasOwnProperty.call js 
Javascript :: filter 2d array javascript 
Javascript :: star print in javascript 
Javascript :: is javascript loosely typed 
Javascript :: react-google-invisible-recaptcha 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =