#1-4Task. Artiom Uradau#975
Conversation
KostyaKov
left a comment
There was a problem hiding this comment.
I'll mark the PR as "Draft", please click "ready for review" when it will be finished. Thank you!
| */ | ||
| function concatenateStrings(value1, value2) { | ||
| throw new Error('Not implemented'); | ||
| return value1+value2; |
There was a problem hiding this comment.
It is necessary to observe indents between operators
| */ | ||
| function extractNameFromTemplate(value) { | ||
| throw new Error('Not implemented'); | ||
| return value.substring(7,value.length-1); |
There was a problem hiding this comment.
It is necessary to observe indents between operators
| */ | ||
| function getCardId(value) { | ||
| throw new Error('Not implemented'); | ||
| let cards = ['A', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K']; |
| */ | ||
| function getRectangleArea(width, height) { | ||
| throw new Error('Not implemented'); | ||
| return width*height; |
There was a problem hiding this comment.
It is necessary to observe indents between operators
| */ | ||
| function getCicleCircumference(radius) { | ||
| throw new Error('Not implemented'); | ||
| return radius*2*Math.PI; |
There was a problem hiding this comment.
It is necessary to observe indents between operators
| */ | ||
| function removeFalsyValues(arr) { | ||
| throw new Error('Not implemented'); | ||
| return arr.filter(elem => { |
There was a problem hiding this comment.
Here you can use simple option "filter(Boolean)"
| */ | ||
| function getUpperCaseStrings(arr) { | ||
| throw new Error('Not implemented'); | ||
| let array = arr.map(elem => { |
There was a problem hiding this comment.
You can use return without variable.
Example: "arr.map(n => n.toUpperCase())"
| */ | ||
| function toCsvText(arr) { | ||
| throw new Error('Not implemented'); | ||
| let array = arr.map(elem => { |
There was a problem hiding this comment.
Here you can use just "join('\n')"
| function findAllOccurences(arr, item) { | ||
| throw new Error('Not implemented'); | ||
| let numberOfRepeatedChars = 0; | ||
| arr.filter(elem => { |
There was a problem hiding this comment.
You can solve this using "filter" and "length" without counter
| function getFalsyValuesCount(arr) { | ||
| throw new Error('Not implemented'); | ||
| let numberOfFalses = 0; | ||
| arr.filter(elem => { |
There was a problem hiding this comment.
You can solve this using "filter" and "length" without counter
f49cd6a to
9fa3ea8
Compare
https://travis-ci.com/github/uryadov1998/js-assignments/builds/182028664