Open in app

Sign In

Write

Sign In

Calugo
Calugo

Home

About

Oct 28, 2022

.toString() iterations

Let’s say you have an array. That’s great data, but you need it to be a string to work with it the way you need to. Luckily for us, there is the .find() method! Per the docs: “The toString() method returns a string representing the specified array and its elements.” For example, we have an array that looks like the following: “ const array1 = [1, 2, 'a', '1a']; console.log(array1.toString()); // expected output: "1,2,a,1a"

1 min read

1 min read


Oct 28, 2022

.find Iteration

Using .find() is a fantastic way to work with data in arrays. Per the docs: “The find() method returns the first element in the provided array that satisfies the provided testing function. If no values satisfy the testing function, undefined is returned.” Let’s say you have an array “const array1 = [5, 12, 8, 130, 44]; const found = array1.find(element => element > 10); console.log(found); // expected output: 12"

1 min read

1 min read


Oct 28, 2022

.map Array Iteration

So if you’ve started working with data on a frontend, you may have found yourself working with arrays of objects more times than not. My preferred way to wrangle these objects into doing what a need them to do is through the .map function. Let’s say you have an array…

1 min read

1 min read


Oct 28, 2022

e.preventDefault() and your form

So you’ve started coding for awhile now, and you’re finding that you enjoy it quite a lot! Now you’re ready to get past your “Hello world!” codes and start to look at something a little more practical for everyday online use. Let’s say you have a form to submit a…

Coding

2 min read

Coding

2 min read

Calugo

Calugo

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech