From dac5ea57f4c1d40204357880563aeb91ee75816e Mon Sep 17 00:00:00 2001 From: Zach Lumpkins Date: Tue, 15 Jan 2019 13:45:23 -0800 Subject: [PATCH] docs(guide): canvas paths guide edits for clarity (#30729) * "create use paths" --> "create and use paths" * Use ES6 syntax in code example (`var` --> `const`/`let`) --- guide/english/canvas/paths/index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/guide/english/canvas/paths/index.md b/guide/english/canvas/paths/index.md index 3b860b6152..ca70bd5f8d 100644 --- a/guide/english/canvas/paths/index.md +++ b/guide/english/canvas/paths/index.md @@ -5,7 +5,7 @@ title: Paths Paths are the building block of drawing in Canvas. A path is just a shape. Then, the shape can be drawn on by either stroking it or filling it. -We can create use paths with `beginPath`, `fill`, and `stroke`. +We can create and use paths with `beginPath`, `fill`, and `stroke`. ```js ctx.beginPath(); @@ -57,8 +57,8 @@ The first example will draw two squares, while the second will only draw one sin This fact leads to a common mistake in making `canvas` animations. ```js -var x = 0; -var y = 0; +const y = 0; +let x = 0; function draw() { ctx.clearRect(0, 0, canvas.width, canvas.height);