From 96b88893e39aa3e299e28800049c8a48eb7c9854 Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Tue, 2 Jan 2018 10:44:42 +0200 Subject: [PATCH] Update once.md --- snippets/once.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/snippets/once.md b/snippets/once.md index a3b3e6adb..01d6216d1 100644 --- a/snippets/once.md +++ b/snippets/once.md @@ -2,9 +2,8 @@ Ensures a function is called only once. -Utilizing a closure, use a variable flag and set it to true once the function is called -for the first time, preventing it from being called again. Allow the function to be supplied -with an arbitrary number of arguments using the spread/rest (`...`) operator. +Utilizing a closure, use a flag, `called`, and set it to `true` once the function is called for the first time, preventing it from being called again. +Allow the function to be supplied with an arbitrary number of arguments using the spread (`...`) operator. ```js const once = fn => {