Решить задачу javascript
4 USDмне пришло замечание по заданию https://www.codewars.com/kata/58983deb128a54b530000be6/train/javascript :
function bracesStatus(string) {
const array = ['(', ')', '[', ']', '{', '}'];
let bracketsArrays = [['('],[')'],['['],[']'],['{'],['}']];
let checkExp = Array();
const exp = string.split('');
exp.forEach(elem => {
if (array.includes(elem)) {
checkExp.push(elem)
}
})
checkExp.forEach(elem=>{
array.forEach(ar=>{
if (elem == ar){
bracketsArrays.forEach((br,i,arr)=>{
if (br[0] == ar){
arr[i].push(ar);
}
})
}
})
})
if (bracketsArrays[0].length == bracketsArrays[1].length && bracketsArrays[2].length == bracketsArrays[3].length && bracketsArrays[4].length == bracketsArrays[5].length) {
return true
} else {
return false
}
}
Помогите разобраться с замечаниями по моему решению
-
Добрый день, Антон!
Давайте обсудим все детали, помогу
Обращайтесь - буду рад сотрудничеству!
-
141 Здравствуйте. Уже есть готовый код для решения данной задачи, если интересно обращайтесь в лс.
-
181 Мне нравится решать подобные задачки.
Хочу решить и эту, если позволите!
-
2593 427 9 1 у вас там код не верно написан, могу написать эту функцию
= - =- =- =- =- =- =- =- = - =- =- =- =- =- =- =- = - =- =- =- =- =- =- =-
-
Покажите замечание. Такую задачу можно решить при помощи стэка.
-
Current freelance projects in the category Javascript and Typescript
Optimization of WordPress site speed
113 USD
We will send full details in private messages Goal Maximize website loading speed, especially on mobile devices. KPI (mandatory) After the work is completed, the following metrics must be achieved. Mobile Performance 90+ LCP less than 2.2 sec INP less than 200 ms CLS less than… HTML & CSS, Javascript and Typescript ∙ 3 hours 45 minutes back ∙ 37 proposals |
Integration of a service cost calculator on the Webflow site
330 USD
We are looking for a developer to integrate a ready-made service cost calculator into our website, created on Webflow. About the company We are engaged in: furniture assembly; TV mounting; mounting shelves, pictures, mirrors, and other items; moving help; heavy lifting; handyman… Javascript and Typescript, Web Programming ∙ 4 hours 45 minutes back ∙ 36 proposals |
I am looking for an experienced Full Stack developer to create a SaaS service for online stores.Service idea: The client uploads a link to their product feed (XML or CSV). The service automatically retrieves the products, takes their photos, and creates new advertising images based on ready-made templates: price, discount, logo, promotional tags, etc. There should also be… Javascript and Typescript, Web Programming ∙ 3 days 11 hours back ∙ 86 proposals |
Development of a WebGL/Three.js scene with generation and export of 3D (snapshot) from an animated shaderObject Description:The project is a designer table shaped like a realistic, deep whirlpool (a central vortex that smoothly transitions from a wide horizontal tabletop to a thin elegant leg). Task Essence:A WebGL / Creative Coding developer is required to create an interactive 3D… Javascript and Typescript, Web Programming ∙ 4 days 7 hours back ∙ 30 proposals |
Support and development of the cleaning company's website
20 USD
I'm looking for a web developer/webmaster for long-term support and development of a cleaning company's website. Website: https://donely.ca About the project DoneLy Home Services is a cleaning service company in Canada that is actively growing and expanding its geographical… Javascript and Typescript, Web Programming ∙ 6 days 9 hours back ∙ 64 proposals |