Can anyone help me on the seek and destroy, I have it working if I test values individual, but when I throw it together with multiple values it fails, I think it has to do with the for loop, would someone help me, This is my first time using help, not sure what is proper protocol

yeah, the way I wrote it works, it is a problem with the for loop. like if I do return value != 3 it will work, or value != 2, it works, just not with the loop that reads the array and test against the array values

@JohnnyBizzel I just copied the link for getting random quotes from some example and now understand I need to dig into the url and understand it. what should I google to get links to some good articles on this topic.

@JLuboff So more general question for you as I work through this .....It seems to me that the IF statements and SWITCH statements are essentially the same thing just written a bit differently...but still the same logic process.....I don't currently see when it would be more beneficial to use one over the other

hi there can someone help me with the twich api ? I don't see how I'm going to get multiple getJSON calls . I've tried doing it in a for loop I've tried doing it recursively and with while loop but nothing works

I also tried using promises inside the for loop but still it doesn't work

In the Mutations exercise (assuming that I've converted the passed in array argument into to 2 strings str0, str1 and iterating over characters in the ) is str0.indexOf(str1.charAt(i)) a good way to confirm a character exists in both strings

Hey everyone, I'm trying to figure out exactly how RegEx works. I cheated on one of the challenges and it told me to use this, but I want to actually understand what's going on before I clear the challenge. Can anyone break this down for me? I can't find a good breakdown elsewhere. (It's supposed to remove spaces from a string)

@walidashri here's the thing. in the portion you say "change html" I don't actually want to change the html I want to update an array which is going to be inside the document ready function . how do I go about doing that outside of it?

Hi, can someone help me please. Does anyone notice a difference between these two pieces of code? The top one is mine and the bottom is someone else's. When I run mine, the challenge doesn't let me continue, however, the other one passes. Am I missing something? - Thanks var total = 0;

@kathrynwiley I was scrolling back up..Dot Notation is converting the value to a string (string literal). Example: myObj.name; is the same as myObj["name"]; and as we all know quotes define strings. If you want to use a variable for accessing the value of object properties you cannot use Dot Notation. You have to use Bracket Notation. Example: var num = 42;myObj[num];

@tiremon112 order matters... code run from top to bottom...soo if u call ur funciton with 4 orderMyLogic(4);it SHOULD say "less than 5"but since 4 is less than 10 too.. it output "less than 10" insteadsoo u need to REORDER the conditions

@tiremon112 - look at the current order of the tests. If you have the value 3 in val, your first test if ( val < 10) will evaluate to true. But if you had the tests ordered differently, it would also evaluate to true for if ( val < 5 ). So you want to have the smallest condition checked first, then the next greater value, then finally all of the values above the specific values that you are testing.

@Lawanu - but if you did use the correct method of access the property, and there was such a property there, contacts[i][prop] would return the value of the property, which would probably not work, either. Unless the property name and value were the same - but that's probably of very limited usefulness.

@AlisonYoon Let's say you were at a big business event and you're quite popular (with all those skills you have) throughout the event you got handed 200 business cards (Which will remain unordered). Now, I walk up to you at the end and ask you.. Do you have a Business Card for "Jane Smith"? Now you loop look through your stack of 200 business cards. When would you tell me that you didn't have a business card for Jane? (Simplest answer please.)

Working on the Diff Two Arrays where I have to "Compare two arrays and return a new array with any items only found in one of the two given arrays, but not both." This seems to work for most, but not for all and I can't figure out why... can anyone help? Here is my code:

Hey, I'm working on Stand in Line challenge in the JS section and can someone tell me why "function nextInLine([], 1) would not equal "1". It's the only parameter on this challenge not met. ( Honestly, I don't under stand why it would equal anything at all...)

@Austiclyse@Austiclyse - the instructions say: Add the number to the end of the array, then remove the first element of array. Are you doing that? How are you adding a number to the end of the array?Also, if you give some analysis to the conditions, you are starting with an empty array [] and want to be able to get the 1 into and out of it - how would you do that?

@khaduch ... i assumed I was adding a number to the end of the array because the console.log readout change from "before" and "after" being identical "[1, 2, 3, 4, 5]" to the new "after" readout being "[2, 3, 4, 5, 6]". As far as I can see I am meeting that requirement. If you're asking how I can provide the code again. And how I would get "1" from an empty array is exactly the thing that didn't make sense to me so if you're asking me, I really can't answer that.

Write a function nextInLine which takes an array (arr) and a number (item) as arguments. Add the number to the end of the array, then remove the first element of array. The nextInLine function should then return the element that was removed.

My question is: How are you adding the number to the end of the array. You are doing two things in your code, a .shift() and a .push() - which one is adding to the array, and which one is removing from the array? The one that adds should be first, and the one that removes should be second.

For most of the other cases, where the array is not empty, you are going to pass the tests for the most part no matter which order you do things in. For this one, it is very crucial to do things in the proper order.

@revisualize Thank you for the link. @khaduch Okay, I did not realize the order was significant in this case. There are still several aspects about this problem I don't understand but for now I'm happy just move on from in and come back later with more experience. Thank you for informing me the order was important for the empty array qualifier.

@KSMOknot you should just index arr since it's an array like this arr[0], arr[1] that will give you the two elements in array, then you can use a loop to go through the characters of the second element, using indexOf to check if it exists in the first element

I posted this on the main chat, but probably should have posted here. Let me know if you need to see my code:

Hey everyone, I am working on some of the javascript algorithms, particularly the smallest common multiples. I have been trying this for several days, reading, checking Stackoverflow, the documentation, etc. Here's what I have so far.

I am keeping all the prime numbers in the series and reducing all nonprimes to a set of prime factors.

The last six numbers are all arrays. I want to compare my array of primes with my arrays of prime factors and only merge from the prime factors only those factors that are missing.

So, looping backwards from 13 to 1 - I keep 13 for my final array, then need to add [3, 2, 2] to my final array (to represent 12), then I add 11, but when I only need [5] from my [5, 2] array (think, 10), since 2 is already there. Then only [3] from [3,3], and only 2 from [2, 2, 2]. You see where I'm going with that.

I can't for my mind think of how to accomplish this. It is probably so obvious is right in front of my face.

Assign the following three lines of text into the single variable myStr using escape sequences.

FirstLine\SecondLine\ThirdLineYou will need to use escape sequences to insert special characters correctly. You will also need to follow the spacing as it looks above, with no spaces between escape sequences or words.

Still looking for advice. How do you merge two arrays, so that the first array includes all its original elements, plus only those elements from the second array not in the first (which may be duplicate values).

Hi I have a snippet of code in my react app that is, let snipp="<p>Wiki <bold>Viewer</bold></p>”; How do I render it without the html tags or better still applying the html tags to the element and then rendering it.

Can anyone help with this? Been doing this one for a couple hours with multiple combinations and I cant figure it out.. It is the Stand in Line challenge. This is what I have and it is asking for.. Add the number to the end of the array, then remove the first element of array. The nextInLine function should then return the element that was removed.

I feel like I am closer but there is something missing. Still need to "Add the number to the end of the array, then remove the first element of array. The nextInLine function should then return the element that was removed."