![]() If the value isn't in the array we will see a false value returned. If the value we are looking for is in the array, the output will be a true boolean value. In order to use the method we just have to write our arrays name, add the method, and then put in the value that we are looking for. Now let's imagine that there are much more values stored in this array and we forget which ones are stored there and which aren't. Let's create an array with a couple of elements. Luckily for us, there is a method that was created so you don't have to lose your time looking through all the values inside. You could probably check through the whole array just so you can check for that one certain element. It is a very important part of programming and you probably couldn't do the stuff that you want to do without arrays.īut what happens when your array gets so big you forget all the values that are stored in it. ![]() ![]() The array is almost always used in your or someone's code.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |