From f35edc12538a0acfc1c8663276786b1154c3b192 Mon Sep 17 00:00:00 2001 From: davhojt Date: Mon, 2 May 2022 12:20:58 +0100 Subject: [PATCH] docs(find-expression): correct grammar --- subjects/find-expression/README.md | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/subjects/find-expression/README.md b/subjects/find-expression/README.md index 61e722c9..e4ab0aaf 100644 --- a/subjects/find-expression/README.md +++ b/subjects/find-expression/README.md @@ -2,25 +2,22 @@ ### Instructions -Create a function called `findExpression` that takes a number as parameter and returns a string - -- It will be given two constant variable `add4` and `mul2` - -- Your goal is to try to find a sequence, starting from the number 1, and repeatedly either adding 4 or multiplying 2 - that produces the number given has parameter. - For example, the number 8 you must first multiplying by 2 twice and then add 4. - It will look something like this `1 *2 *2 +4` +Create a function named `findExpression` that takes a `number` as parameter and returns a `string`. +- 2 constant variables will be made available to your function: `add4` and `mul2`. +- Your goal is to try to find a sequence, starting from the number 1, and repeatedly either adding 4 or multiplying by 2, to produce the number given as a parameter. - If the number can not be reached you should return `undefined` +For example, for the number `8`, you must first multiply by 2 twice, and then add 4. Your function should return something like: `1 *2 *2 +4`. + ### Notions -- [nan-academy.github.io/js-training/examples/loops.js](https://nan-academy.github.io/js-training/examples/loops.js) -- [nan-academy.github.io/js-training/examples/recursion.js](https://nan-academy.github.io/js-training/examples/recursion.js) +- [Loops](https://nan-academy.github.io/js-training/examples/loops.js) +- [Recursion](https://nan-academy.github.io/js-training/examples/recursion.js) ### Code provided -> all code provided will be added to your solution and doesn't need to be submited. +> The provided code will be added to your solution, and does not need to be submitted. ```js const add4 = '+4'