About me
I'm 28 years old and I am married to Yulia. I'm currently I'm working musical instruments online store. My strengths are hard working and attentiveness to details.
I've been studying frontend for two years now. I really strive to learn new thing. I stydied in online school Glo-academy on the courses "JavaScript" and "React & React / Redux". At the moment I am self-studying.
Education
Belarusian national technical university
Information systems and technologies
Specialization: software engineer
Years: 2011-2016
Courses
-
Redux & React-redux
Glo-academy, 2019Modular structure JSX, State, Props, Component lifecycle, Styled-components, Working with Forms, Working with API, React Router, Hooks, React Patterns, Redux, Connecting React and Redux;
-
JavaScript
Glo-academy, 2019Data Types, Functions, Scope, Closures, Loops, Objects, DOM, Code Debugger, Events, This, Prototypes, Constructors, Classes, Forms, Validation, JSON, AJAX, Asynchronous JS, Fetch API, Webpack and Babel;
Projects
Code example
Array.prototype.length will give you the number of top-level elements in an array.
Your task is to create a function deepCount that returns the number of ALL elements within an array, including any within inner-level arrays.
function deepCount(a){
let count = 0;
function getLenghtArr (str) {
count += str.length;
for (let i = 0; i < str.length; i++) {
if (typeof(str[i]) == "object") {
getLenghtArr(str[i]);
}
}
}
getLenghtArr(a);
return count;
}