Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5,714 changes: 5,712 additions & 2 deletions package-lock.json

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions problems/countNumbers.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,13 @@
* returns { 99: 2, 11: 1, 12: 1, 13: 1, 58: 1 }
*/

function countNumbers() {

function countNumbers(arr) {
let newArr = []
for (let i = 0; i < arr.length; i += 1) {

// irid through arr,
//list all numbers in arr and how many of each

}


Expand Down
7 changes: 4 additions & 3 deletions problems/getCountriesSortedByPopulation.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
* returns: ["China", "Egypt", "Denmark"]
*
*/

function getCountriesSortedByPopulation() {

// newArr to be arranged in population order from big - small with country listed as well
function getCountriesSortedByPopulation(arr) {
let newArr = []
//
}

module.exports = getCountriesSortedByPopulation
7 changes: 5 additions & 2 deletions problems/isOdd.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@
* ex: isOdd(75); // true
*/

function isOdd() {

function isOdd(n) {
return (n % 2 === 1) ? true : false
}
//console.log(isOdd(7))


module.exports = isOdd

8 changes: 6 additions & 2 deletions problems/numberOfDigits.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@

*/

function numberOfDigits() {

function numberOfDigits(n) {
let num = ''
for (let n = 0; n <= n.length + 1; i += 1) {
num = n
}
return n
}

module.exports = numberOfDigits
7 changes: 6 additions & 1 deletion problems/removeEvenStrings.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@
* returns: []
*/

function removeEvenStrings() {
function removeEvenStrings(arr) {
let newArr = ['']
let oddStr = [(0 % 2 === 1)]
for (let i = 0; i <= arr.length; i += 1)



}

Expand Down
4 changes: 3 additions & 1 deletion problems/removeNumbersAtOddIndices.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
* ex: removeNumbersAtOddIndices([5, 4, 3, 2, 1]);
* returns: [5, 3, 1]
*/
function removeNumbersAtOddIndices() {
function removeNumbersAtOddIndices(arr) {
let newArr = []


}

Expand Down
3 changes: 2 additions & 1 deletion problems/removeOddNumbers.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
* ex: removeOddNumbers([2, 4, 6])
* returns: [2, 4, 6]
*/
function removeOddNumbers() {
function removeOddNumbers(arr) {
let arr = ['']

}

Expand Down
3 changes: 1 addition & 2 deletions problems/removeVowels.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
*
*/

function removeVowels() {
function removeVowels() {}

}

module.exports = removeVowels
3 changes: 2 additions & 1 deletion problems/sevenBoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
* 17 is also replaced with 'BOOM' because it contains a 7.
*/

function sevenBoom() {
function sevenBoom(n) {


}

Expand Down
3 changes: 1 addition & 2 deletions problems/smallest.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
* returns 1 (does not matter if it is the first or second 1)
*/

function smallest() {
function smallest(arr) {

}

module.exports = smallest