diff --git a/12_Day_Regular_expressions/12_day_regular_expressions.md b/12_Day_Regular_expressions/12_day_regular_expressions.md index f5e9bed..c178962 100644 --- a/12_Day_Regular_expressions/12_day_regular_expressions.md +++ b/12_Day_Regular_expressions/12_day_regular_expressions.md @@ -430,9 +430,9 @@ console.log(result) // true 1. The position of some particles on the horizontal x-axis -12, -4, -3 and -1 in the negative direction, 0 at origin, 4 and 8 in the positive direction. Extract these numbers and find the distance between the two furthest particles. ```js -points = ['-1', '2', '-4', '-3', '-1', '0', '4', '8'] -sortedPoints = [-4, -3, -1, -1, 0, 2, 4, 8] -distance = 12 +points = ['-12', '-4', '-3', '-1', '0', '4', '8'] +sortedPoints = [-12, -4, -3, -1, 0, 4, 8] +distance = 20 ``` 1. Write a pattern which identify if a string is a valid JavaScript variable