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.

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

function countNumbers() {

function countNumbers(arr) {
arr = {[]}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remember to declare your variables with a let or const in front of them. Also, an empty object requires only curly braces, no square brackets necessary.

for(let i = 0; i < arr.length; i++){
return

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this function asking us to return? Do we want to return inside of our for loop?

}
}


Expand Down
2 changes: 1 addition & 1 deletion problems/getCountriesSortedByPopulation.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
*/

function getCountriesSortedByPopulation() {
function getCountriesSortedByPopulation(arr) {

}

Expand Down
4 changes: 2 additions & 2 deletions problems/isOdd.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
* ex: isOdd(75); // true
*/

function isOdd() {

function isOdd(n) {
return n % 2 === 1
}

module.exports = isOdd
3 changes: 2 additions & 1 deletion problems/numberOfDigits.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

*/

function numberOfDigits() {
function numberOfDigits(n) {
return n.toString().length

}

Expand Down
11 changes: 9 additions & 2 deletions problems/removeEvenStrings.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,15 @@
* returns: []
*/

function removeEvenStrings() {

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recall how to index into arrays. What is the variable name for our array and what is the variable name for our index?

newArr [i-1] = i
}
}
return newArr
}


module.exports = removeEvenStrings
4 changes: 2 additions & 2 deletions problems/removeNumbersAtOddIndices.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
* ex: removeNumbersAtOddIndices([5, 4, 3, 2, 1]);
* returns: [5, 3, 1]
*/
function removeNumbersAtOddIndices() {

function removeNumbersAtOddIndices(arr) {
return arr.
}

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

function sevenBoom() {

function sevenBoom(num) {
let numberArray = []
for(let n = 1; n <= num; n ++){
numberArray [n-1] =
}
}

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

function smallest() {
function smallest(arr) {
return

}

Expand Down