Skip to content

Carina Taveras - #170

Open
tCarina wants to merge 11 commits into
joinpursuit:masterfrom
tCarina:master
Open

Carina Taveras#170
tCarina wants to merge 11 commits into
joinpursuit:masterfrom
tCarina:master

Conversation

@tCarina

@tCarina tCarina commented Jan 4, 2021

Copy link
Copy Markdown

No description provided.

*/

function findSecondSmallest() {}
function findSecondSmallest(nums) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Think about how you can use your findSmallest function to find this answer

Comment thread problems/arraysWithLoops.js Outdated
// Hint: Look into the `.includes` method.
function removeDups() {}
function removeDups(nums) {
let duplicates = []

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Look up the .includes() method to solve this

Comment thread problems/loops.js Outdated
function endsWithFiveWhileLoop() {}
function endsWithFiveWhileLoop() {
let newArray= []
let i = 1

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Another way to write this is to start i at 5 since no number before that will end with 5

Then you can increment i by 5 in a for loop

Just another way to think about it!

let newArray = []
for (let i of array){
newArray.push(i + "!")
i++;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

"for of" loops increment themselves so you don't need i++

also remember i isn't an index in a for of loop, it's the element, so this is like saying "happy"++

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants