Questions tagged as 'array'

2
answers

I'm trying to print an array using for in javascript, but it does not display correctly

Print manually and then tried to use for to print, but it turned out I could not see it properly. let mochila = new Array(); let item1 = ['corda', 2], item2 = ['faca', 3], item3 = ['cura', 23], item4 = ['prego', 35];...
asked by 07.11.2018 / 13:30
2
answers

What are the applications of arrays in day to day? (examples of its usability)

I did an internet search on the use of arrays and I found many results aimed at creating games only ... But outside this example, where else do I use arrays in everyday (application development for example)? I have this doubt because the book...
asked by 28.10.2017 / 20:27
4
answers

Remove array positions that have the common name

I want to get certain positions of my array that have the names of positions in common, and play for another array . EX: array 'id' => '147' 'nome' =>'João' 'email' => '[email protected]' 'data_nascimento' => '05/01/1...
asked by 14.11.2014 / 20:58
4
answers

Is there a smaller way to solve the question below? and know if it's correct

Create an algorithm that contains a vector of integers. Then your algorithm should generate two more vectors. The first vector must store the numbers of the initial vector in ascending order and the second must store the values of the initial v...
asked by 17.09.2017 / 22:24
3
answers

Check if the values of an array are all equal PHP?

I would like to check if all the values in my array are the same and I did it as follows: $minha_lista = array('a','a','a'); if(!empty($minha_lista)) { if(count(array_unique($minha_lista))===1){ return true; } else {...
asked by 06.12.2016 / 12:29
2
answers

Working with Array in PHP

I would like to know how to proceed to achieve the result below in PHP . The output I have today is: Array ( [0] => "0000000009999999" [1] => "20181209" [2] => "000000" [3] => "REM BASICA" [4] => "0....
asked by 24.12.2018 / 00:19
2
answers

How to store split strings in an ArrayList?

I'm doing a job where I need to save the information for a checking account, I need to read the information in a file (text) and split this information to divide it into account code , name and balance . Also, I need to save this information...
asked by 31.03.2017 / 16:09
1
answer

Error adding new instances to an array in Javascript [closed]

I have the following problem I have an array that adds the instance of an auxiliary object to the instance of an HTMLElement, but only the last element is being added, I tested it in the Chrome, Chromium, Opera and Mozilla Firefox browser and in...
asked by 13.04.2014 / 23:51
3
answers

Dictionary does not return all possible words

The idea of the program is to be a dictionary, the user informs the word, the program performs a check on the characters of the word finds the position in the vector and returns the definition if the word appears in the dictionary. The problem...
asked by 17.10.2017 / 11:55
2
answers

Find Array Value in Object

I have the following object: let Filmes = [{ "Nome": "Harry Potter 1", "Preco": "50" }, { "Nome": "Harry Potter 2", "Preco": "60" },...
asked by 23.01.2018 / 13:15