Skip to content
Cassie Levett edited this page Nov 15, 2020 · 2 revisions

Welcome to the emeraldproductions wiki! Character sheet wiki can be found on my Roll20 fork.

Functions

Home to useful little functions that I have made over the years.

Array

Find duplicates in an Array

array.filter((value,index,self) => self.indexOf(value) !== index )

Find Average

const arrAvg = arr => arr.reduce((a,b) => a + b, 0) / arr.length

Sum

const arrSum = arr => arr.reduce((a,b) => a + b, 0)

Clone this wiki locally