about summary refs log tree commit diff stats
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/b.js10
-rw-r--r--js/canvas/game.js7
2 files changed, 7 insertions, 10 deletions
diff --git a/js/b.js b/js/b.js
index 18c28d7..ec44ab7 100644
--- a/js/b.js
+++ b/js/b.js
@@ -26,10 +26,10 @@
 
 const b = {
 	pipe: (...args) => args.reduce((acc, el) => el(acc)),
-	compose: (...fns) => (...args) => fns.reduceRight((res, fn) => [fn.call(null, ...res)], args)[0],
-	identity: x => x,
-	curry: (fn) => {
-	  let curried = (...args) => {
+	  compose: (...fns) => (...args) => fns.reduceRight((res, fn) => [fn.call(null, ...res)], args)[0],
+    identity: x => x,
+    curry: (fn) => {
+	  const curried = (...args) => {
 	      if (args.length >= fn.length)
 	          return fn(...args)
 	      else
@@ -69,4 +69,4 @@ const b = {
 // const noVowels = b.replace(/[aeiou]/ig);
 // const censored = noVowels('*');
 // const r4 = censored('Chocolate Rain');
-// console.log('curry ', r1, r2, r3, r4);
\ No newline at end of file
+// console.log('curry ', r1, r2, r3, r4);
diff --git a/js/canvas/game.js b/js/canvas/game.js
index 569cc4c..7b02bde 100644
--- a/js/canvas/game.js
+++ b/js/canvas/game.js
@@ -12,7 +12,6 @@ const ctx = canvas.getContext("2d");
 ctx.fillStyle = "#e0f8cf";
 ctx.fillRect(0, 0, canvas.width, canvas.height);
 
-
 // create a rectangle
 const rect = {
   x: 50,
@@ -21,14 +20,13 @@ const rect = {
   height: 16,
   step: 12,
   color: "#65ff00",
-  colorAlt: "pink",
+  colorAlt: "pink"
 };
 
 // draw the rectangle
 ctx.fillStyle = rect.color;
 ctx.fillRect(rect.x, rect.y, rect.width, rect.height);
 
-
 // move the rectangle
 rect.x += 5;
 
@@ -39,7 +37,6 @@ ctx.clearRect(0, 0, canvas.width, canvas.height);
 ctx.fillStyle = rect.color;
 ctx.fillRect(rect.x, rect.y, rect.width, rect.height);
 
-
 // add keyboard input
 document.addEventListener("keydown", (event) => {
   switch (event.code) {
@@ -88,4 +85,4 @@ function gameLoop() {
 }
 
 // start the game loop
-requestAnimationFrame(gameLoop);
\ No newline at end of file
+requestAnimationFrame(gameLoop);