From 703e2e2e9d9ccd773253120d708a69980a23f4da Mon Sep 17 00:00:00 2001 From: Isabelle Viktoria Maciohsek Date: Sat, 29 Jan 2022 20:36:45 +0200 Subject: [PATCH] Update formatting --- blog_posts/eslint-refactor-for-in.md | 2 +- blog_posts/javascript-sleep.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/blog_posts/eslint-refactor-for-in.md b/blog_posts/eslint-refactor-for-in.md index 1f50aab60..a1b550a04 100644 --- a/blog_posts/eslint-refactor-for-in.md +++ b/blog_posts/eslint-refactor-for-in.md @@ -17,7 +17,7 @@ And here are three refactoring options to deal with it: ### Object.keys() -`Object.keys()` has the exact same behavior as a `for..in` loop, so it can be used as a drop-in replacement: +`Object.keys()` has the exact same behavior as a `for...in` loop, so it can be used as a drop-in replacement: ```js const data = [3, 4]; diff --git a/blog_posts/javascript-sleep.md b/blog_posts/javascript-sleep.md index b5715bd73..362661ed9 100644 --- a/blog_posts/javascript-sleep.md +++ b/blog_posts/javascript-sleep.md @@ -9,11 +9,11 @@ firstSeen: 2020-08-04T20:08:54+03:00 lastUpdated: 2021-11-06T20:51:47+03:00 --- -JavaScript does not come with a `sleep()` function out of the box. That's probably a good idea considering the environments where it runs and the trouble it could cause if used incorrectly. The closest equivalent is the `setTimeout` function, but there are other, less common ways to implement a function that will pause execution for a specified amount of time. +JavaScript does not come with a `sleep()` function out of the box. That's probably a good idea considering the environments where it runs and the trouble it could cause if used incorrectly. The closest equivalent is the `setTimeout()` function, but there are other, less common ways to implement a function that will pause execution for a specified amount of time. ### setTimeout -JavaScript's `setTimeout` sets a timer which executes some code once the timer expires. Only the code inside the `setTimeout` callback will execute after the timer expires. This can lead to nesting issues, as well as code executing out of order if you are not careful. +JavaScript's `setTimeout()` sets a timer which executes some code once the timer expires. Only the code inside the `setTimeout()` callback will execute after the timer expires. This can lead to nesting issues, as well as code executing out of order if you are not careful. ```js const printNums = () => {