Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

Codewars Beginner Series #3 Sum of Numbers

const getSum = (a, b) => {
    let min = Math.min(a, b),
        max = Math.max(a, b);
    return (max - min + 1) * (min + max) / 2;
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: enter event in jquery 
Javascript :: how to play jquery audio 
Javascript :: wp_enqueue_script bootstrap 5 
Javascript :: jquery onclick function 
Javascript :: import menu material ui 
Javascript :: react scroll to bottom of div 
Javascript :: javascript do arrays intersect 
Javascript :: Javascript detect mobile browser 
Javascript :: base64 decode javascript 
Javascript :: get localstorage 
Javascript :: how to remove name in react navigation header 
Javascript :: console group 
Javascript :: trim comma in javascript 
Javascript :: installing node on ec2 instance 
Javascript :: Add click event to querySelectorAll js 
Javascript :: jquery toggle attribute disabled 
Javascript :: javascript byte array to hex string 
Javascript :: remove all dots from string javascript 
Javascript :: for elem in list javascript 
Javascript :: unique string generator javascript 
Javascript :: js check string for pangram 
Javascript :: toggle bootstrap modal with jquery 
Javascript :: javascript localStorage clear items 
Javascript :: Masonry js cdn 
Javascript :: add attribute selected jquery 
Javascript :: android resource linking failed react native image crop picker 
Javascript :: remove first 3 characters from string javascript 
Javascript :: addeventlistener to button javascript 
Javascript :: redirect is not defined react/jsx-no-undef 
Javascript :: react hide source code 
ADD CONTENT
Topic
Content
Source link
Name
2+3 =