Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

javascript Sum of a sequence

const sequenceSum = (begin, end, step) => {
  let sum = 0
  for (let i = begin; i <= end; i += step) sum += i;
  return sum
};
console.log(sequenceSum(2, 6, 2))

// With love @kouqhar
Comment

PREVIOUS NEXT
Code Example
Javascript :: array of images javascript 
Javascript :: date.parse string to javascript 
Javascript :: gesture handling with react native expo 
Javascript :: useReducer 
Javascript :: length of set javascript 
Javascript :: async await javascript stack overflow 
Javascript :: vuejs get value of checkbox group 
Javascript :: javascript merge arrays of objects without duplicates 
Javascript :: javascript get call stack 
Javascript :: field array using useFormik 
Javascript :: jquery has parent with class 
Javascript :: bind an event to dom element angular 
Javascript :: javascript compare two arrays of objects 
Javascript :: return all trs in a table jqueyr 
Javascript :: canvas rectangle rounded corners 
Javascript :: check if an element is there in js 
Javascript :: pass data from child to parent react 
Javascript :: get values inside json node js 
Javascript :: swap two variables javascript 
Javascript :: jquery validation with ajax submit 
Javascript :: js check if array is empty 
Javascript :: js add a tag inside span 
Javascript :: discord.js lockdown command 
Javascript :: remove object from array by name javascript 
Javascript :: o que é jsonm 
Javascript :: merge-sort js 
Javascript :: jquery number counter 
Javascript :: set background image URL jQuery 
Javascript :: cubic root javascript 
Javascript :: visual studio code create react component shortcut 
ADD CONTENT
Topic
Content
Source link
Name
7+1 =