From c2140cb3aad8c5cbbb8117a7f11f87cd79be77b6 Mon Sep 17 00:00:00 2001 From: atomiks Date: Sat, 6 Jan 2018 00:18:41 +1100 Subject: [PATCH] Update createEventHub.md --- snippets/createEventHub.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/createEventHub.md b/snippets/createEventHub.md index c1cd73097..86ded9037 100644 --- a/snippets/createEventHub.md +++ b/snippets/createEventHub.md @@ -8,7 +8,7 @@ each one with `Array.forEach()` by passing in the data as an argument. For `on`, create an array for the event if it does not yet exist, then use `Array.push()` to add the handler to the array. -For `off`, use `Array.findIndex()` to find the index of the handler in the event array and remove it. +For `off`, use `Array.findIndex()` to find the index of the handler in the event array and remove it using `Array.splice()`. ```js const createEventHub = () => ({