From 9bdd11dfd1cf0de0a7d3f0fa52b6f74b938f8eb6 Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Sun, 31 Dec 2017 15:02:19 +0200 Subject: [PATCH] Update isValidJSON.md --- snippets/isValidJSON.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/isValidJSON.md b/snippets/isValidJSON.md index e81748be9..2a7c91971 100644 --- a/snippets/isValidJSON.md +++ b/snippets/isValidJSON.md @@ -5,7 +5,7 @@ Checks if the provided argument is a valid JSON. Use `JSON.parse()` and a `try... catch` block to check if the provided argument is a valid JSON. ```js -const arr = (obj) => { +const isValidJSON = obj => { try{ JSON.parse(obj); return true;