These are chat archives for FreeCodeCamp/HelpJavaScript

11th
Apr 2017
intcreate
@intcreate
Apr 11 2017 00:00
like the newest version of javascript is es6 i mean
Dingly Do
@dinglydo
Apr 11 2017 00:00
@intcreate Kinda, The reason why es became a thing in the first place is because Javascript was not that direct of whats its gonna be
Keon Samuel
@keonsam
Apr 11 2017 00:00
if(num >=1) {
for(var v=0;v<argsA[num+1].length;v++){
if (symmetric.indexOf(argsA[num+1][v]) === -1){
symmetric.push(argsA[num+1][v]);
    }
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 00:00
@JLuboff laters
Dingly Do
@dinglydo
Apr 11 2017 00:00
then some company wanted to make javascript a standard for web dev
Keon Samuel
@keonsam
Apr 11 2017 00:00
if(num >=1) {
        for(var v=0;v<argsA[num+1].length;v++){
        if (symmetric.indexOf(argsA[num+1][v]) === -1){
          symmetric.push(argsA[num+1][v]);

        }
Dingly Do
@dinglydo
Apr 11 2017 00:00
which is what ECMA is all about
it introduced some new things and commands
and is basically nowadays javascript
So in a way Javascript is es6
intcreate
@intcreate
Apr 11 2017 00:01
is ecma the main type of javascript
Dingly Do
@dinglydo
Apr 11 2017 00:01
yes
it is the standard
intcreate
@intcreate
Apr 11 2017 00:01
oh ok
Guderian Raborg
@hypercuber
Apr 11 2017 00:01
@HeebieGeeBee I see.
intcreate
@intcreate
Apr 11 2017 00:01
so wat type of javascript are we learning on fcc
es6?
Dingly Do
@dinglydo
Apr 11 2017 00:01
yaup
intcreate
@intcreate
Apr 11 2017 00:01
wow cool
Dingly Do
@dinglydo
Apr 11 2017 00:02
however I think later on youll explore more into es6 later on in fcc
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 00:02
i think this version of fcc only deals with upto es5 actually
but the beta is in ies6
Dingly Do
@dinglydo
Apr 11 2017 00:02
he is probably right as I have not yet programmed in ES6
Well, Now I may ask my own question
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 00:03
@keonsam have you got you diff two arrays function?
Dingly Do
@dinglydo
Apr 11 2017 00:03
I am stuck on the level "Title Case a sentence"
Joseph
@revisualize
Apr 11 2017 00:03
Diff Two Arrays.. Then Diff a third array!
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 00:04
lol yup
Dingly Do
@dinglydo
Apr 11 2017 00:04
I have been working on it for days but I could not figure out how to solve it
here is my code so far
function titleCase(str) {

  var Properstr;
  var wordList = str.split();
  for (var x = 0; x <= wordList.length - 1; x++)
  {
    var charList = wordList[x].split("");

    Properstr = charList[0].toUpperCase();
    Properstr += charList[x + 1];
  }
    return Properstr;
}

titleCase("I'm a little tea pot");
Some reason I only do the first 2 characters then stop
intcreate
@intcreate
Apr 11 2017 00:04
what is that 4
Dingly Do
@dinglydo
Apr 11 2017 00:05
and return only the first 2
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 00:05
@amrojjeh charList[x + 1] is just the next letter
you want that rest of the word
Dingly Do
@dinglydo
Apr 11 2017 00:05
ya
but I don't know how I could get the whole word
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 00:05
slice might be handy
Dingly Do
@dinglydo
Apr 11 2017 00:05
I did use it
I tried to slice each word
then slice each letter within the words
Guderian Raborg
@hypercuber
Apr 11 2017 00:06
slice(1) maybe?
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 00:06
no just slice the restof the word
and add it to the capital first letter
Dingly Do
@dinglydo
Apr 11 2017 00:06
wait what do you mean by rest of the word?
oh wait
I could but for problems like these
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 00:07
@amrojjeh als cus youre storing in the properstr variable
Dingly Do
@dinglydo
Apr 11 2017 00:07
"titleCase("sHoRt AnD sToUt")"
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 00:07
and every iteration youre just re assigning that value
Dingly Do
@dinglydo
Apr 11 2017 00:07
I cant just make the first word upper case
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 00:07
you'll only ever ge t returned what is assigned in the last iteration
Dingly Do
@dinglydo
Apr 11 2017 00:07
I am planning on fixing everything and appending it to properstr
but thats not working out well
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 00:08
seems redundant
Dingly Do
@dinglydo
Apr 11 2017 00:08
basically I check one letter than fix it then append it
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 00:08
just do wordsList[x] = .....
Dingly Do
@dinglydo
Apr 11 2017 00:08
I repeat the same process until I finish with the sentence
then repend it
So do I get rid of the whole variable?
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 00:09
@amrojjeh yes and no need to split the word inside the loop either
Dingly Do
@dinglydo
Apr 11 2017 00:09
but what about cases like these
titleCase("sHoRt AnD sToUt")
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 00:09
you jsut need one line inside that loop and no need to declare a new variable
Ricardo G.
@Rubenricardo
Apr 11 2017 00:10
whats up guys
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 00:10
@amrojjeh you can make everything lowercase before the loops
Ricardo G.
@Rubenricardo
Apr 11 2017 00:10
i still cannot figuire this out
Dingly Do
@dinglydo
Apr 11 2017 00:10
ohhhhhhhhhhh
Ricardo G.
@Rubenricardo
Apr 11 2017 00:10

var ourArray = [];

for (var i = 0; i < 5; i++) {
ourArray.push(i);
}

// Setup
var myArray = [];

// Only change code below this line.
for (var i = 1; i < 6; i++);
{
myArray.push(i);}

Dingly Do
@dinglydo
Apr 11 2017 00:10
@HeebieGeeBee Ill try to work on that, thanks
CamperBot
@camperbot
Apr 11 2017 00:10
amrojjeh sends brownie points to @heebiegeebee :sparkles: :thumbsup: :sparkles:
:star2: 1244 | @heebiegeebee |http://www.freecodecamp.com/heebiegeebee
Ricardo G.
@Rubenricardo
Apr 11 2017 00:10
this should throw 1,2,3,4,5
should;nt it?
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 00:10
@Rubenricardo dont put a semi colon after the loop conditions like that
Ryan Haire
@RyaanH
Apr 11 2017 00:11
Should i read about algorithms? like sorting algorithms and such
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 00:11
semi colon indicates the end of a statement
Ricardo G.
@Rubenricardo
Apr 11 2017 00:12
that was it
@HeebieGeeBee thanks
CamperBot
@camperbot
Apr 11 2017 00:12
:star2: 1245 | @heebiegeebee |http://www.freecodecamp.com/heebiegeebee
rubenricardo sends brownie points to @heebiegeebee :sparkles: :thumbsup: :sparkles:
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 00:12
@RyaanH what for?
Ricardo G.
@Rubenricardo
Apr 11 2017 00:12
haha bloody semicolon
but now i know
JohannesMvv
@JohannesMvv
Apr 11 2017 00:12
Hey guys, i'm still pretty new with javascript. Can anyone give me a hand with this challenge
Dingly Do
@dinglydo
Apr 11 2017 00:13
@JohannesMvv Sure
Ryan Haire
@RyaanH
Apr 11 2017 00:13
@HeebieGeeBee so i can understand these challenges more clearly and other sites challenges
JohannesMvv
@JohannesMvv
Apr 11 2017 00:13

function nextInLine(arr, item) {
// Your code here
testArr.push(item);

return testArr.shift(); // Change this line
}

// Test Setup
var testArr = [5,6,7,8,9];

// Display Code
console.log("Before: " + JSON.stringify(testArr));
console.log(nextInLine(testArr, 2)); // Modify this line to test
console.log("After: " + JSON.stringify(testArr));

nextInLine([5,6,7,8,9], 1) should return 5
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 00:13
@RyaanH well sure it couldnt hurt i guess
Manish Giri
@Manish-Giri
Apr 11 2017 00:13
@JohannesMvv use arr not testArr
Ryan Haire
@RyaanH
Apr 11 2017 00:13
lol ok'
JohannesMvv
@JohannesMvv
Apr 11 2017 00:14
@Manish-Giri when doing the push or the shift?
Manish Giri
@Manish-Giri
Apr 11 2017 00:14
@JohannesMvv both times
JohannesMvv
@JohannesMvv
Apr 11 2017 00:15
both?
ohh, thanks man
@Manish-Giri thanks
CamperBot
@camperbot
Apr 11 2017 00:15
johannesmvv sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 5099 | @manish-giri |http://www.freecodecamp.com/manish-giri
Dingly Do
@dinglydo
Apr 11 2017 00:15
@HeebieGeeBee How do you make a word lowercase? Do you have to split the world into letters and make them lowercase using a forloop?
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 00:16
str = str.toLowerCase();
Dingly Do
@dinglydo
Apr 11 2017 00:16
wordList[x].toLowerCase(); I did this
x being a word within the list
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 00:16
string are immutable
Manish Giri
@Manish-Giri
Apr 11 2017 00:17
@amrojjeh where is the result being saved?
Dingly Do
@dinglydo
Apr 11 2017 00:17
wordlist is an array though right?
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 00:17
you will need re assign the value
its an array of strings
Dingly Do
@dinglydo
Apr 11 2017 00:17
@Manish-Giri To wordlist
webennes
@webennes
Apr 11 2017 00:17
// Setup
function phoneticLookup(val) {
  var result = {
    "alpha":"Adams",
    "bravo":"Boston",
    "charlie":"Chicago",
    "delta":"Denver",
    "echo":"Easy",
    "foxtrot":"Frank"
  };

  // Only change code above this line
  return result.val; // not work...
  return result[val]; // work.... why ?!  .---.
}

// Change this value to test
phoneticLookup("charlie");
Dingly Do
@dinglydo
Apr 11 2017 00:17
oh wait
Manish Giri
@Manish-Giri
Apr 11 2017 00:17
@amrojjeh .toLowerCase returns a value
Dingly Do
@dinglydo
Apr 11 2017 00:17
its not changing to anything, sully mistake
Manish Giri
@Manish-Giri
Apr 11 2017 00:17
unless you save it
Dingly Do
@dinglydo
Apr 11 2017 00:17
silly*
Manish Giri
@Manish-Giri
Apr 11 2017 00:17
it won't affect anything
JohannesMvv
@JohannesMvv
Apr 11 2017 00:17
@Manish-Giri when i use testArr i get the same output, can you shed some light as to why this is bad so i can understand the issue fully?
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 00:18
@webennes val is a variable you need to use bracket notation with variables
Dingly Do
@dinglydo
Apr 11 2017 00:18
@Manish-Giri thanks
CamperBot
@camperbot
Apr 11 2017 00:18
amrojjeh sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 5100 | @manish-giri |http://www.freecodecamp.com/manish-giri
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 00:18
dot notation with string
webennes
@webennes
Apr 11 2017 00:18
hum.... thanks man =)
Manish Giri
@Manish-Giri
Apr 11 2017 00:18
@JohannesMvv look at your function declaration -
function nextInLine(arr, item)
JohannesMvv
@JohannesMvv
Apr 11 2017 00:18
yup
Manish Giri
@Manish-Giri
Apr 11 2017 00:18
arr is the argument passed to your function
you should work with that
shouldn't go about modifying global values
that might have unknown implications in real world
JohannesMvv
@JohannesMvv
Apr 11 2017 00:19
ok, so when in a function only modify local
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 00:20
when writings functions youre most the time only using the parameters of the function
Mario Fredricko
@marfredd
Apr 11 2017 00:21
blob
guys, i'm trying to access my location, but when I use pen to make this simple html + js to show my location like the example, i cant get the location, any idea where i've been wrong?
JohannesMvv
@JohannesMvv
Apr 11 2017 00:21
ok awesome. Thanks again @HeebieGeeBee and @Manish-Giri
CamperBot
@camperbot
Apr 11 2017 00:21
johannesmvv sends brownie points to @heebiegeebee and @manish-giri :sparkles: :thumbsup: :sparkles:
:warning: johannesmvv already gave manish-giri points
:star2: 1246 | @heebiegeebee |http://www.freecodecamp.com/heebiegeebee
Manish Giri
@Manish-Giri
Apr 11 2017 00:22
check your browser console
@marfredd
Mario Fredricko
@marfredd
Apr 11 2017 00:24
@Manish-Giri it shows this
blob
@Manish-Giri actually i just copy and paste from the example in the challenge but i couldnt get the location
Manish Giri
@Manish-Giri
Apr 11 2017 00:24
@marfredd did you load jQuery?
webennes
@webennes
Apr 11 2017 00:24
lib jQuery ?
Mario Fredricko
@marfredd
Apr 11 2017 00:25
@Manish-Giri @webennes ah! you're right, forget to change the setting.. thanks guys
CamperBot
@camperbot
Apr 11 2017 00:25
:cookie: 207 | @webennes |http://www.freecodecamp.com/webennes
:star2: 5101 | @manish-giri |http://www.freecodecamp.com/manish-giri
marfredd sends brownie points to @manish-giri and @webennes :sparkles: :thumbsup: :sparkles:
Deepan Udaiyar
@CodeToOvercome
Apr 11 2017 00:27
Hi guys , am currently working on Stand In Line challenge
i am kinda stuck..Can u guys enlighten me ?
Dingly Do
@dinglydo
Apr 11 2017 00:28
wowowowowo there is something called a tiny url
no offence btw, just a reccomndation
recommendation
Deepan Udaiyar
@CodeToOvercome
Apr 11 2017 00:28
lol..next time for sure..

```unction nextInLine(arr, item) {
// Your code here
testArr.push(7);
testArr.shift();
return testArr; // Change this line
}

// Test Setup
var testArr = [1,2,3,4,5];

// Display Code
console.log("Before: " + JSON.stringify(testArr));
console.log(nextInLine(testArr, 1)); // Modify this line to test
console.log("After: " + JSON.stringify(testArr));
```

HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 00:29
for one use arr not testARr
Caitlyn Tetmeyer
@caitlyntetmeyer
Apr 11 2017 00:29
I don't even understand the directions in the Stand In Line Challenge.
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 00:29
and then return the shift from the array
not the array
oh and push item not 7
@caitlyntetmeyer do you understand how the push pop shift and unshift methods work?
Caitlyn Tetmeyer
@caitlyntetmeyer
Apr 11 2017 00:31
Yes
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 00:32
right, so you want to write a function that you push the item into the arr array and then return the value you shift from the arr array
Deepan Udaiyar
@CodeToOvercome
Apr 11 2017 00:38
@HeebieGeeBee so i should set var arr first ??
Emmanuel Eze
@ezdevelopers
Apr 11 2017 00:40
hello everyone, I am having issues with the chunky monkey challenge. I can't seem figure out what to do
webennes
@webennes
Apr 11 2017 00:41
please some help .---.
what i had maked wrong ? :worried:
// Setup
var myObj = {
  gift: "pony",
  pet: "kitten",
  bed: "sleigh"
};

function checkObj(checkProp) {
  // Your Code Here
  if(checkProp.hasOwnProperty(checkProp)){
    return checkProp += checkProp.property;
  }
  return "Not Found";
}

// Test your code by modifying these values
checkObj("gift");
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 00:42
@caitlyntetmeyer no arr is a parameter of the function
Kelvin
@CyberRain94
Apr 11 2017 00:43
hey guys stuck in one of the early javascript challenges "Convert Celsius to Fahrenheit" This is my code.

fahrenheit = 0*9/5+32;

fahrenheit = -30*9/5+32;

fahrenheit = -10*9/5+32;

fahrenheit = 0*9/5+32;

fahrenheit = 20*9/5+32;

fahrenheit = 30*9/5+32;

HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 00:43
@webennes checkProp is the property youre looking for not the object youre looking in
Manish Giri
@Manish-Giri
Apr 11 2017 00:43
wow
Kelvin
@CyberRain94
Apr 11 2017 00:43
its only reading the first and last code i write
Manish Giri
@Manish-Giri
Apr 11 2017 00:43
6 lines?
what for?
FlashHero
@FlashHero
Apr 11 2017 00:43
@webennes you are checking if checkProp hasOwnProperty you have to check if the object hasOwnProperty
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 00:44
@ezdevelopers first off get rid of that nested while loop
and you should push into array
Francis Ngo
@francisngo
Apr 11 2017 00:44
how do you check if the given index is out of range of a given array?
webennes
@webennes
Apr 11 2017 00:44
ok... thanks bro
@HeebieGeeBee @FlashHero thanks
CamperBot
@camperbot
Apr 11 2017 00:45
webennes sends brownie points to @heebiegeebee and @flashhero :sparkles: :thumbsup: :sparkles:
:cookie: 168 | @flashhero |http://www.freecodecamp.com/flashhero
:star2: 1247 | @heebiegeebee |http://www.freecodecamp.com/heebiegeebee
Manish Giri
@Manish-Giri
Apr 11 2017 00:45
@francisngo check if it's greater than/equal to array's size
Francis Ngo
@francisngo
Apr 11 2017 00:45
hmm thats what i thought i did..
could you please help? its another HR prep
function getElementOfArrayProperty(obj, key, index) {
  // your code here
  var element;
  if(obj.hasOwnProperty(key)){
    if(!Array.isArray(obj[key]) || !obj[key].length || index > obj[key].length) {
      return undefined;
    } else {
      for(var i = 0; i < obj[key].length; i++){
        if(obj[key][i] === index){
          element = obj[key][i];
        }
      }
      return element;
    }
  }
  return undefined;
}
Manish Giri
@Manish-Giri
Apr 11 2017 00:46
@francisngo check if it's greater than/equal to array's size
greater than + equal to
Francis Ngo
@francisngo
Apr 11 2017 00:47
so index >= obj[key].length
instructions:

Write a function called "getElementOfArrayProperty".

Given an object, a key, and a numerical index, "getElementOfArrayProperty" returns the value of the element at the given index of the array located within the given object at the given key.

Notes:

  • If the array is empty, it should return undefined.
  • If the given index is out of range of the array located at the given key, it should return undefined.
  • If the property at the given key is not an array, it should return undefined.
  • If there is no property at the key, it should return undefined.

var obj = {
key: ['Jamil', 'Albrey']
};
var output = getElementOfArrayProperty(obj, 'key', 0);
console.log(output); // --> 'Jamil'

Kelvin
@CyberRain94
Apr 11 2017 00:48
I thought i needed six different lines, for the different answers its asking about. I don't know how to separate the lines, so that it reads all of them separately. unless i am going about it wrong all together?
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 00:48
@ezdevelopers in sudo code
create empty holding array
iterate over the array with a variable that increases buy the value of size each time 
every iteration of the loop push a slice of the array, which starts from loop variable index and is the size of the size,  into the holding array
return holding array
Francis Ngo
@francisngo
Apr 11 2017 00:48
woops
Manish Giri
@Manish-Giri
Apr 11 2017 00:49
@CyberRain94 if I call your function with hundred different inputs, would your function have 100 lines it?
Keon Samuel
@keonsam
Apr 11 2017 00:51
@moigithub
this is my solution for Diff Two Arrays
hanafiduck
@hanafiduck
Apr 11 2017 00:51
Use pop() on myArray
Keon Samuel
@keonsam
Apr 11 2017 00:51

function diffArray(arr1, arr2) {
  var finalArr=[];
  var returnArr;
  for(var i=0; i<arr1.length;i++){
  if (arr2.indexOf(arr1[i]) === -1) {
  finalArr.push(arr1[i]);
  }
  }
  for(var e=0; e<arr2.length;e++){
    if(arr1.indexOf(arr2[e]) === -1) {
      finalArr.push(arr2[e]);
    }
  }                       
  return finalArr;
  }




diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5]);
and this is Symmetric Difference
 if(num ===0) {
    for (var i=0; i<argsA[0].length;i++){
      if(argsA[1].indexOf(argsA[0][i]) ===-1){
        symmetric.push(argsA[0][i]);
      }
    }
    for (var e=0; e<argsA[1].length;e++){
      if(argsA[0].indexOf(argsA[1][e]) ===-1){
        symmetric.push(argsA[1][e]);
      }
}
}
see the similarity?
Deepan Udaiyar
@CodeToOvercome
Apr 11 2017 00:53

@HeebieGeeBee i think almost got it..Except the return argument..
```function nextInLine(arr, item) {
// Your code here
arr.push(item);
arr.shift();
return arr; // Change this line
}

// Test Setup
var testArr = [1,2,3,4,5];

// Display Code
console.log("Before: " + JSON.stringify(testArr));
console.log(nextInLine(testArr, 1)); // Modify this line to test
console.log("After: " + JSON.stringify(testArr));
```

HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 00:53
@CodeToOvercome youre returning the array, you just want to return the value you shift
Dalton Escoe
@Alenero129
Apr 11 2017 00:54
Hello
Deepan Udaiyar
@CodeToOvercome
Apr 11 2017 00:54
@HeebieGeeBee so do i use the index method ?
Dalton Escoe
@Alenero129
Apr 11 2017 00:54

Does anyone know how the reverse function work?
function palindrome(str) {
// Good luck!
str = str.toLowerCase();
str = str.replace(/[^A-Za-z0-9]/g, '');

str = str.split("");
var str1 = str.reverse();

return str1;
}
palindrome("Fatduck%");

When I use var str1 = str.reverse(); str becomes reversed as well
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 00:55
arr.shift() removes the item from the front of the array but it also returns the value you shifted from the array
Deepan Udaiyar
@CodeToOvercome
Apr 11 2017 00:56
@HeebieGeeBee sweet..let me try ..
Dalton Escoe
@Alenero129
Apr 11 2017 00:56
Can anyone clarify why it works like that?
hanafiduck
@hanafiduck
Apr 11 2017 00:56
help : You must have at least 5 items in your list
var myList = [["awdwadwa",2323]];
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 00:57
@Alenero129 does it?
hanafiduck
@hanafiduck
Apr 11 2017 00:58
anyone help me please
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 00:58
@Alenero129 ok yeah it acts upon the array
Manish Giri
@Manish-Giri
Apr 11 2017 00:59
@hanafiduck put 5 such sub arrays in the main one
Dalton Escoe
@Alenero129
Apr 11 2017 01:01
@HeebieGeeBee Yup.
@HeebieGeeBee Even if I do str1=str; str1=str.reverse(); it still reverses str
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 01:03
@Alenero129 store the str.split(" ") in str1
then reverse it
Deepan Udaiyar
@CodeToOvercome
Apr 11 2017 01:04
webennes
@webennes
Apr 11 2017 01:04
man how i make a function to check if Obj.hasOwnProperty... ?! :worried:
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 01:05
@CodeToOvercome ?
thats gone back a few steps
FlashHero
@FlashHero
Apr 11 2017 01:06
@webennes you can use a if statement to check if the object has a property
webennes
@webennes
Apr 11 2017 01:07

function teste(obj, prop) {
   if(obj.hasOwnProperty(prop){
       return obj.property
}
}
:#
function hasKey5(k,o) { return (obj.hasOwnProperty(x)); }
Joseph
@revisualize
Apr 11 2017 01:08
@webennes Your code doesn't make sense
webennes
@webennes
Apr 11 2017 01:09
yes
i know :worried:
Joseph
@revisualize
Apr 11 2017 01:10
@webennes You have this:
function hasKey5(k,o) { return (obj.hasOwnProperty(x)); }
What is k ... what is o .. where did obj come from... What is x?
FlashHero
@FlashHero
Apr 11 2017 01:11
@webennes you have to pass a obj as your first parameter and a property to check if it exists
MiguelM47
@MiguelM47
Apr 11 2017 01:11
myGlobal should have a value of 10 and oopsGlobal should have a value of 5. How can I fix this?

// Declare your variable here
var myGlobal = "10";                      
function fun1(5) {
// Assign 5 to oopsGlobal Here
oopsGlobal = "5";
}

// Only change code above this line
function fun2() {
  var output = "";
  if (typeof myGlobal != "undefined") {
    output += "myGlobal: " + myGlobal;
  }
  if (typeof oopsGlobal != "undefined") {
    output += " oopsGlobal: " + oopsGlobal;
  }
  console.log(output);
}
Joseph
@revisualize
Apr 11 2017 01:12
@webennes That link doesn't answer my questions.
Raihan Habib
@mrh07
Apr 11 2017 01:12
var myDog = "Hunter";
var dogs = {
Fido: "Mutt",
Hunter: "Doberman",
Snoopie: "Beagle"
}
var breed = dogs[myDog];
console.log(breed);// "Doberman" why the last line is about doberman , can't it be Mutt or Beagle ? help plz
webennes
@webennes
Apr 11 2017 01:13
I'm looking for the solution ... bro
FlashHero
@FlashHero
Apr 11 2017 01:13
@webennes instead of saying obj.property say return true
hanafiduck
@hanafiduck
Apr 11 2017 01:13
nextInLine([2], 1) should return 2
nextInLine([5,6,7,8,9], 1) should return 5

function nextInLine(arr, item) {
// Your code here

return arr[arr.length-1] = item; // Change this line
}

// Test Setup
var testArr = [1,2,3,4,5];

// Display Code
console.log("Before: " + JSON.stringify(testArr));
console.log(nextInLine(testArr, 6)); // Modify this line to test
console.log("After: " + JSON.stringify(testArr));

got an error
nextInLine([2], 1) should return 2
nextInLine([5,6,7,8,9], 1) should return 5
Joseph
@revisualize
Apr 11 2017 01:14
@webennes The solution to what?
@webennes You wrote this:
example:
function teste(obj, prop) {
   if(obj.hasOwnProperty(prop){
       return obj.property;       // What is the value at obj.property ?
   }
}
webennes
@webennes
Apr 11 2017 01:16
@FlashHero ok... and @revisualize solution for this question " instruction Modify the function checkObj to test myObj for checkProp. If the property is found, return that property's value. If not, return "Not Found".
Joseph
@revisualize
Apr 11 2017 01:16
@webennes OH!
@webennes See that's where i"m confused. You changed the function name
@webennes I didn't even know that was a FreeCodeCamp challenge.
webennes
@webennes
Apr 11 2017 01:17
this was a very bad example ..
Joseph
@revisualize
Apr 11 2017 01:17
@webennes if(obj.hasOwnProperty(prop){ that is correct
webennes
@webennes
Apr 11 2017 01:17
forget ..
Joseph
@revisualize
Apr 11 2017 01:17
Kind of
You need to use the correct Object Name
@webennes You also need to understand that:
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];
FlashHero
@FlashHero
Apr 11 2017 01:18
@webennes say obj[prop]
Joseph
@revisualize
Apr 11 2017 01:18
@FlashHero But, the object is named differently. So is the function parameter
They aren't using the actual challenge code.
FlashHero
@FlashHero
Apr 11 2017 01:19
@revisualize ya that kind of got me confused as well when I first saw the challenge
webennes
@webennes
Apr 11 2017 01:20
@revisualize man i know that myObje.name and myObje["name"] is the same... but it don't solve my question .. =;
but both is for diferrent purposes ..
FlashHero
@FlashHero
Apr 11 2017 01:22
@webennes to access the value of the object property you want to say obj[prop] that is the same thing as obj['whatever the property is'] which would equal to the value of the property so you're returning the value of that property
webennes
@webennes
Apr 11 2017 01:22
@FlashHero man thanks for your explanation.. and @revisualize thanks bro..
CamperBot
@camperbot
Apr 11 2017 01:22
webennes sends brownie points to @flashhero and @revisualize :sparkles: :thumbsup: :sparkles:
:warning: webennes already gave flashhero points
:star2: 3711 | @revisualize |http://www.freecodecamp.com/revisualize
Deepan Udaiyar
@CodeToOvercome
Apr 11 2017 01:22
@HeebieGeeBee thanks
CamperBot
@camperbot
Apr 11 2017 01:22
codetoovercome sends brownie points to @heebiegeebee :sparkles: :thumbsup: :sparkles:
:star2: 1248 | @heebiegeebee |http://www.freecodecamp.com/heebiegeebee
Deepan Udaiyar
@CodeToOvercome
Apr 11 2017 01:23

@HeebieGeeBee ```
function nextInLine(arr, item) {
// Your code here
arr.push(item);
var previousElement = arr.shift();
return previousElement ; // Change this line
}

// Test Setup
var testArr = [1,2,3,4,5];

// Display Code
console.log("Before: " + JSON.stringify(testArr));
console.log(nextInLine(testArr, 1)); // Modify this line to test
console.log("After: " + JSON.stringify(testArr));

@HeebieGeeBee this worked for me
Keon Samuel
@keonsam
Apr 11 2017 01:23
for(var v=0;v<argsA[num].length;v++){
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 01:23
@CodeToOvercome cool
Gilbert
@gilbertp97
Apr 11 2017 01:24

function myLocalScope(myVar) {

  console.log(myVar);


}
myLocalScope(1);
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 01:24
well done you can just do return arr.shift(); too
@CodeToOvercome
Gilbert
@gilbertp97
Apr 11 2017 01:24
why am i gettin an error for this?
it says console.log never called
Deepan Udaiyar
@CodeToOvercome
Apr 11 2017 01:24
@HeebieGeeBee i tried that..but it removes a number from array.
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 01:25
@CodeToOvercome its meant to
Keon Samuel
@keonsam
Apr 11 2017 01:25
num is a variable
Deepan Udaiyar
@CodeToOvercome
Apr 11 2017 01:26
@HeebieGeeBee sure, but that doesn't let me pass the challenge.
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 01:26
@CodeToOvercome it will
Synsational
@Synsational
Apr 11 2017 01:26
Hello can someone help me with Arithmetic operations (Increment)?
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 01:26
if you do it properly
FlashHero
@FlashHero
Apr 11 2017 01:26
@gilbertp97 you shouldn't get an error you should get whatever you pass in as your parameter
Deepan Udaiyar
@CodeToOvercome
Apr 11 2017 01:27
@HeebieGeeBee so what am i doing wrong then ?
Synsational
@Synsational
Apr 11 2017 01:27
var myVar =87;
I have to get this to equal 88 using i++, how should I go about this?
im having difficulty identifying i
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 01:27
@CodeToOvercome look at your link is that what youre meant to be showing me?
@Synsational myVar++ is the same as writing myVar = myVar + 1
Dalton Escoe
@Alenero129
Apr 11 2017 01:28
@HeebieGeeBee Much thanks, bro
CamperBot
@camperbot
Apr 11 2017 01:28
:star2: 1249 | @heebiegeebee |http://www.freecodecamp.com/heebiegeebee
alenero129 sends brownie points to @heebiegeebee :sparkles: :thumbsup: :sparkles:
Synsational
@Synsational
Apr 11 2017 01:29
oh wow that was so simlpe
thank you
Deepan Udaiyar
@CodeToOvercome
Apr 11 2017 01:29
@HeebieGeeBee yes
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 01:29
@CodeToOvercome well everything is wrong with that code
Deepan Udaiyar
@CodeToOvercome
Apr 11 2017 01:29
@HeebieGeeBee lol
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 01:30
youre using testArr and then trying to push an number into the array and then trying to just return the array
Thom
@klondikepanther
Apr 11 2017 01:30

I am almost done with my quote generator but I am stuck. I don't know how to get the content in the href intent to tweet to update with the new quotes. I dont know what to put on the other side of the equal sign in the href intent to tweet
html

<p class="heading">here are some good quotes</p>

<button id="getQuote" class="btn">Another quote please</button>
<div class="quote">
  <p class="quoteText">
    The message will go here
  </p>
</div>
<p class="author">author</p>


<a class="btnOne" href="https://twitter.com/intent/tweet?text=" target="_blank">
  <img src="https://simplesharebuttons.com/images/somacro/twitter.png" alt="Twitter">
</a>

Javascript

$(document).ready(function() {$.ajaxSetup({ cache: false });
  $("#getQuote").on("click", function() {

    $.getJSON("http://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1&callback=", function(toBeQuoted) {

      var content = toBeQuoted[0].content;
      var author = toBeQuoted[0].title;
      $(".quote").html(content);
      $(".author").html(author);

    });
  });
});
Keon Samuel
@keonsam
Apr 11 2017 01:30
this is a bug
:-1:
Manish Giri
@Manish-Giri
Apr 11 2017 01:30
everything is a bug isn't it
Deepan Udaiyar
@CodeToOvercome
Apr 11 2017 01:32
@HeebieGeeBee okay i wll try again tomorrow Thanks for ur help again..
CamperBot
@camperbot
Apr 11 2017 01:32
codetoovercome sends brownie points to @heebiegeebee :sparkles: :thumbsup: :sparkles:
:warning: codetoovercome already gave heebiegeebee points
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 01:32
@klondikepanther you'l need update your href within your javascript
hanafiduck
@hanafiduck
Apr 11 2017 01:33
Combine the two if statements into one statement which returns "Outside" if val is not between 10 and 20, inclusive. Otherwise, return "Inside".
---------- help ------------

function testLogicalOr(val) {
// Only change code below this line

if (val>10 || val <20) {
return "Outside";
}

// Only change code above this line
return "Inside";
}

// Change this value to test
testLogicalOr(15);

HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 01:34
$(".btnOne").attr("href", "https://twitter.com/intent/tweet?text=" + content); @klondikepanther
something like that
Thom
@klondikepanther
Apr 11 2017 01:35
@HeebieGeeBee Thanks man I will try that!
CamperBot
@camperbot
Apr 11 2017 01:35
klondikepanther sends brownie points to @heebiegeebee :sparkles: :thumbsup: :sparkles:
:star2: 1250 | @heebiegeebee |http://www.freecodecamp.com/heebiegeebee
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 01:36
@klondikepanther btw i think its better to use id's rather than classes for elements that are singular
Thom
@klondikepanther
Apr 11 2017 01:37
@HeebieGeeBee I will do that as well. I am still new to this, and I have lots to learn about best pratices
Gulsvi
@gulsvi
Apr 11 2017 01:42
@klondikepanther Be sure to test tweeting quotes with special characters in them, like ; - you may need to encode your tweets to work correctly.
Another good challenge for getting that project to work correctly
Joseph
@revisualize
Apr 11 2017 01:43
@hanafiduck If val is greater than 10 or val is less than 20 .. it is outside of the range between 10 and 20?
Thom
@klondikepanther
Apr 11 2017 01:44
@SkyCoder01 I was thinking of tackling that next also the <p> elements are being tweeted which I dont want. Any quick advice?
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 01:44
k joseph is on it
Gulsvi
@gulsvi
Apr 11 2017 01:44
@klondikepanther jQuery has a .text() method that will strip out your html, so you could use $(content).text()
Keon Samuel
@keonsam
Apr 11 2017 01:45
this should work
function sym(args) {
  var argsA =[...arguments];
  var symmetric =[];
  var num =0;
  var b= 0;
   while(num < argsA.length){
    if(b ===0) {
    for (var i=0; i<argsA[0].length;i++){
      if(argsA[1].indexOf(argsA[0][i]) ===-1){
        symmetric.push(argsA[0][i]);

      }
    }
    for (var e=0; e<argsA[1].length;e++){
      if(argsA[0].indexOf(argsA[1][e]) ===-1){
        symmetric.push(argsA[1][e]);
      }
}
      b =2;
}
      if(num >=1) {
        for(var v=0;v<argsA[num].length;v++){
        if (symmetric.indexOf(argsA[num][v]) === -1){
          symmetric.push(argsA[num][v]);
          num++;
        }
      }
    }
   }
  if(b ===2){
    num =b;
  }
  return symmetric;
  }
sym([1, 2, 3], [5, 2, 1, 4]);
Joseph
@revisualize
Apr 11 2017 01:45
@hanafiduck I think you need to re-evaluate your logic and the challenge.
Keon Samuel
@keonsam
Apr 11 2017 01:45
but saying infinite loop at line 7.
I added this
Thom
@klondikepanther
Apr 11 2017 01:47
@SkyCoder01 Thanks sky
CamperBot
@camperbot
Apr 11 2017 01:47
klondikepanther sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 971 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Keon Samuel
@keonsam
Apr 11 2017 01:47
```
if(b ===2){
    num =b;
    b =10;
  }
Saboor Malik
@MathematicsCoding
Apr 11 2017 01:47
@keonsam Hey been a while
What are you working on?
Keon Samuel
@keonsam
Apr 11 2017 01:48
what up
Symmetric Difference
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 01:48
@keonsam youre doing this in a very confusing way, and its very hard to try comprehend your code
Saboor Malik
@MathematicsCoding
Apr 11 2017 01:49
@keonsam Dang advanced algorithm challenges already?
Shrey Sethi
@Shrey-S
Apr 11 2017 01:51
hey guys
Keon Samuel
@keonsam
Apr 11 2017 01:51
I am very good at maths.
and problem solving.
Saboor Malik
@MathematicsCoding
Apr 11 2017 01:51
I see
Shrey Sethi
@Shrey-S
Apr 11 2017 01:51
var nStr = String.fromCharCode(arr);
return nStr;
what am I doing wrong here?
Saboor Malik
@MathematicsCoding
Apr 11 2017 01:52
@keonsam I feel like you are rushing to get front end cert...
Keon Samuel
@keonsam
Apr 11 2017 01:52
maybe lol
Saboor Malik
@MathematicsCoding
Apr 11 2017 01:52
xD
Thom
@klondikepanther
Apr 11 2017 01:54
@SkyCoder01 would a - count as a special character?
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 01:54
@Shrey-S is arr an array?
Shrey Sethi
@Shrey-S
Apr 11 2017 01:54
yes I'm sure its correct
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 01:54
i dont think you can pass String.fromCharCode arrays
@Shrey-S
Shrey Sethi
@Shrey-S
Apr 11 2017 01:55
it gives me a red dot when I try to output it
Gulsvi
@gulsvi
Apr 11 2017 01:55
@klondikepanther No, only things like semicolons I believe. Check out the method encodeURIComponent(): https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent
Shrey Sethi
@Shrey-S
Apr 11 2017 01:55
ohh
Saboor Malik
@MathematicsCoding
Apr 11 2017 01:55
about @keonsam
CamperBot
@camperbot
Apr 11 2017 01:55
:cookie: 297 | @keonsam |http://www.freecodecamp.com/keonsam
Keon Samuel
@keonsam
Apr 11 2017 01:55
lol
Brandon
@Minneanimal
Apr 11 2017 01:56
Hi all, I think I've accidentally created a JS loop for an exercise. Any ideas on how to reset the code? without the page crashing? It's bad......
Keon Samuel
@keonsam
Apr 11 2017 01:56
on freecodecamp?
Thom
@klondikepanther
Apr 11 2017 01:58
@SkyCoder01 ohh ! I read about that the other day, now I know where to use it. Thanks!
CamperBot
@camperbot
Apr 11 2017 01:58
klondikepanther sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:warning: klondikepanther already gave skycoder01 points
Gulsvi
@gulsvi
Apr 11 2017 01:58
No problem!
Brandon
@Minneanimal
Apr 11 2017 01:58
@HeebieGeeBee Thanks!!!
CamperBot
@camperbot
Apr 11 2017 01:58
minneanimal sends brownie points to @heebiegeebee :sparkles: :thumbsup: :sparkles:
:star2: 1251 | @heebiegeebee |http://www.freecodecamp.com/heebiegeebee
Gulsvi
@gulsvi
Apr 11 2017 01:58
@keonsam Long time! :) how have you been?
Keon Samuel
@keonsam
Apr 11 2017 01:58
good
Saboor Malik
@MathematicsCoding
Apr 11 2017 01:59
@SkyCoder01 You know he is already on advanced scripting challenges
Keon Samuel
@keonsam
Apr 11 2017 01:59
@Alenero129 post your code
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 01:59
@Alenero129 your logic for your if statement is wrong
Dalton Escoe
@Alenero129
Apr 11 2017 01:59

function findLongestWord(str) {
str=str.split(' ');
var longest;

for(var i=0; i<str.length; i++){ var j=1; if(str[i].length>str[j].length){
longest = str[i];
j++;
}
}

return longest.length;
}

HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 02:00
need to compare the length of the longest string
@Alenero129
Saboor Malik
@MathematicsCoding
Apr 11 2017 02:00
@Alenero129 lol nice profile picture
"I bee leave in you!" bee leave = believe
Keon Samuel
@keonsam
Apr 11 2017 02:01
@MathematicsCoding what challenge you on?
Saboor Malik
@MathematicsCoding
Apr 11 2017 02:01
Weather app
Keon Samuel
@keonsam
Apr 11 2017 02:01
you going back or still on it?
Saboor Malik
@MathematicsCoding
Apr 11 2017 02:01
still on it
Did you do it?
Keon Samuel
@keonsam
Apr 11 2017 02:02
yeah
Saboor Malik
@MathematicsCoding
Apr 11 2017 02:02
Can I see it?
Keon Samuel
@keonsam
Apr 11 2017 02:02
let me see your first.
no homo lol
Dalton Escoe
@Alenero129
Apr 11 2017 02:03
@HeebieGeeBee How is it wrong? I think I'm missing somethin
Thanks @MathematicsCoding Motivation haha
CamperBot
@camperbot
Apr 11 2017 02:03
:cookie: 306 | @mathematicscoding |http://www.freecodecamp.com/mathematicscoding
alenero129 sends brownie points to @mathematicscoding :sparkles: :thumbsup: :sparkles:
Saboor Malik
@MathematicsCoding
Apr 11 2017 02:03
@Alenero129 :+1:
Keon Samuel
@keonsam
Apr 11 2017 02:03
@Alenero129 yes
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 02:04
@Alenero129 you want to see if the current string is longer than the word youve stored as the longest up until that point
Keon Samuel
@keonsam
Apr 11 2017 02:05
you need to check which array is longer and only keep it if it is longer.
Saboor Malik
@MathematicsCoding
Apr 11 2017 02:05
@keonsam what do you think of it?
Dalton Escoe
@Alenero129
Apr 11 2017 02:05
@HeebieGeeBee Oh. You're right. Can't believe I didn't see it
Thanks, @HeebieGeeBee
CamperBot
@camperbot
Apr 11 2017 02:06
:warning: alenero129 already gave heebiegeebee points
alenero129 sends brownie points to @heebiegeebee :sparkles: :thumbsup: :sparkles:
Keon Samuel
@keonsam
Apr 11 2017 02:06
@MathematicsCoding good but I spent most of my time on the JS
only took a couple minutes to design the page.
Keon Samuel
@keonsam
Apr 11 2017 02:21
Saboor Malik
@MathematicsCoding
Apr 11 2017 02:22
Yeah I found it :)
Keon Samuel
@keonsam
Apr 11 2017 02:22
what picture have?
a cold pic?
Saboor Malik
@MathematicsCoding
Apr 11 2017 02:23
the farm one
Keon Samuel
@keonsam
Apr 11 2017 02:24
are you from a warn area?
Saboor Malik
@MathematicsCoding
Apr 11 2017 02:24
Warm one yeah
Well alittle cold here
Keon Samuel
@keonsam
Apr 11 2017 02:24
snowing?
Saboor Malik
@MathematicsCoding
Apr 11 2017 02:25
Nah
Just 66 Fahrenheit
Jason Luboff
@JLuboff
Apr 11 2017 02:26
@HeebieGeeBee still going strong into the night I see
Saboor Malik
@MathematicsCoding
Apr 11 2017 02:27
One time I stay awaken from morning until to 5 Am...
Like 24 hours maybe...
21-22 hours
Keon Samuel
@keonsam
Apr 11 2017 02:28
damn
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 02:29
@JLuboff wouldnt call it going strong
Saboor Malik
@MathematicsCoding
Apr 11 2017 02:29
That was when I was a kid..
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 02:29
but still going...
Dan North
@almostkewl
Apr 11 2017 02:29
I can't get my navbar to display the info when collapsed... Here is my pen https://codepen.io/almostkewl/pen/NpMvMa?editors=1100
Jason Luboff
@JLuboff
Apr 11 2017 02:31
@HeebieGeeBee I sure wouldn't be going. I struggle staying up past 11 😂
David Amanze
@GodKingShogun
Apr 11 2017 02:31
@HeebieGeeBee css is proving to be harder than imagined :cry:
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 02:31
gaming is tiring @JLuboff
V Arun Kumar
@arunvkumr
Apr 11 2017 02:31
@almostkewl add jquery and bootstrap.js in settings. for front-end queries use https://gitter.im/FreeCodeCamp/HelpFrontEnd
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 02:32
@GodKingShogun abstract
Dan North
@almostkewl
Apr 11 2017 02:32
@arunvkumr thanks! sorry I didn't notice I was in the javascript room
CamperBot
@camperbot
Apr 11 2017 02:32
almostkewl sends brownie points to @arunvkumr :sparkles: :thumbsup: :sparkles:
:cookie: 583 | @arunvkumr |http://www.freecodecamp.com/arunvkumr
David Amanze
@GodKingShogun
Apr 11 2017 02:32
@HeebieGeeBee what do you mean
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 02:32
i dunno why anyone still draws with css when theres html5 canvas
@GodKingShogun reminds me of a kandinsky painting
David Amanze
@GodKingShogun
Apr 11 2017 02:33
@HeebieGeeBee maybe i will put it up for auction :smile:
Saboor Malik
@MathematicsCoding
Apr 11 2017 02:33
@GodKingShogun So you want to sell yourself?
David Amanze
@GodKingShogun
Apr 11 2017 02:34
@MathematicsCoding that sounds weird
Saboor Malik
@MathematicsCoding
Apr 11 2017 02:34
Maybe
Saboor Malik
@MathematicsCoding
Apr 11 2017 02:34
Not as slave...
Image yourself as a painting
@HeebieGeeBee Can you check out my JS code?
Jason Luboff
@JLuboff
Apr 11 2017 02:34
@HeebieGeeBee eh canvas still has its issues where CSS would be easier
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 02:35
@JLuboff i dont see how css drawing is easier
@MathematicsCoding code for what?
David Amanze
@GodKingShogun
Apr 11 2017 02:36
0 @JLuboff can you give me any tips
Saboor Malik
@MathematicsCoding
Apr 11 2017 02:36
@HeebieGeeBee weather app
Its saying that ipdata isnt defined but Im not seeing any ipdata?
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 02:37
post it @MathematicsCoding
Jason Luboff
@JLuboff
Apr 11 2017 02:38
@HeebieGeeBee eh more so from the perspective of making clickable areas. You can make a div and design it with CSS. With canvas you'd have to first draw it and then have a separate div that you float over the area
@GodKingShogun sorry bud, I'm on mobile at the gym lol
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 02:39
@MathematicsCoding im not seeing anything
Saboor Malik
@MathematicsCoding
Apr 11 2017 02:39
Me too...
Check console
Its saying that ipData isnt defined...
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 02:39
@JLuboff clickable bounds in canvas is pretty easy
@JLuboff and you can use a library like p5 or phaser that makes it even easier
Claudio Restifo
@Marmiz
Apr 11 2017 02:40
@MathematicsCoding you forgot to close the last function with a })
the getJSON function
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 02:41
@MathematicsCoding theres nothing in the console
Saboor Malik
@MathematicsCoding
Apr 11 2017 02:41
That it? jeez...
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 02:42
@JLuboff i guess creating a div is easier
Jason Luboff
@JLuboff
Apr 11 2017 02:43
Ya but to each their own. I think canvas definitely has its place
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 02:44
@JLuboff well it was created for a reason
i wanna do a project that i can do in a day
but not a tic tac toe game
Neal
@njordan9
Apr 11 2017 02:49
Quick question: why do we need to use the the strictly equal operator on the "Golf Code" challenge? Wouldn't the first equality operator, =, work?
Jason Luboff
@JLuboff
Apr 11 2017 02:49
The first two backend projects only took me really a day each except for little fixes here and there
= is the assignment operator not equal
Neal
@njordan9
Apr 11 2017 02:51
Thanks @JLuboff . So == wouldn't work either because that is asking whether two values are equal, right?
CamperBot
@camperbot
Apr 11 2017 02:51
njordan9 sends brownie points to @jluboff :sparkles: :thumbsup: :sparkles:
:star2: 1456 | @jluboff |http://www.freecodecamp.com/jluboff
Jason Luboff
@JLuboff
Apr 11 2017 02:52
== or === are for checking equality. It's advisable to use === as it's the strict equality operator, meaning each element needs to be the same data type.
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 02:53
@JLuboff what were they?
btw where pieter been lately
he too good for us now
David Amanze
@GodKingShogun
Apr 11 2017 02:54
@HeebieGeeBee any idea how i would get the blue circle on the outermost circle to fill out a fourth of the outer circle. hope that makes sense. its getting to be around that time for me but i want to get the css and html done today
@HeebieGeeBee by the way the blue circle is a button
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 02:55
@GodKingShogun seems like youre working the wrong way round to me
why not just make a working game first with all the javascript working
@GodKingShogun and no i wouldnt realy know how to do that in css
maybe @JLuboff does
David Amanze
@GodKingShogun
Apr 11 2017 02:58
@JLuboff :ear:
Jason Luboff
@JLuboff
Apr 11 2017 02:58
@HeebieGeeBee one is the URL shortener and the other was a time/ date converter thing
and @forkerino is camping. Limited paid wifi
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 02:58
what a hippy
Jason Luboff
@JLuboff
Apr 11 2017 03:00
I guess their lease was up on their rental so they're camping until they find something else
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 03:00
im just kidding
Tyler Lay
@Tlay94
Apr 11 2017 03:00

Hi, im stuck incrementing a number with javascript

var myVar = 87;

// Only change code below this line
newVar = myVar + 1++;

instructions:Change the code to use the ++ operator on myVar.
David Amanze
@GodKingShogun
Apr 11 2017 03:01
@Tlay94 myVarr++;
Jason Luboff
@JLuboff
Apr 11 2017 03:01
@GodKingShogun I'm not sure I understand but stroke might work for you. You can give each side a different stroke. That's all I got for now, not in front of a computer
Neal
@njordan9
Apr 11 2017 03:01
Ah, gotcha @JLuboff. Data types meaning string vs integer etc.
Tyler Lay
@Tlay94
Apr 11 2017 03:01

var myVar = 87;

// Only change code below this line
myVar = myVar++;

like dis?

Tyler Lay
@Tlay94
Apr 11 2017 03:02
it needs to equal 88
bstahler123
@bstahler123
Apr 11 2017 03:02

// Setup
function phoneticLookup(val) {
var result = "";

// Only change code below this line
result = {
"alpha": "Adams",
"bravo": "Boston",
"charlie": "Chicago",
"delta": "Denver",
"echo":"Easy",
"foxtrot": "Frank",

};

// Only change code above this line
return result;
}

// Change this value to test
phoneticLookup("charlie");

why this not working?
any help?
Tyler Lay
@Tlay94
Apr 11 2017 03:03
I got it!
Manish Giri
@Manish-Giri
Apr 11 2017 03:03
@bstahler123 what are you returning?
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 03:03
@bstahler123 your object is meant to be a variable called lookup
David Amanze
@GodKingShogun
Apr 11 2017 03:04
@HeebieGeeBee that was really helpful. thanks
CamperBot
@camperbot
Apr 11 2017 03:04
godkingshogun sends brownie points to @heebiegeebee :sparkles: :thumbsup: :sparkles:
:star2: 1252 | @heebiegeebee |http://www.freecodecamp.com/heebiegeebee
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 03:04
and then youre meant o be a returning a value from your lookup object
Jason Luboff
@JLuboff
Apr 11 2017 03:04
@njordan9 ya exactly
bstahler123
@bstahler123
Apr 11 2017 03:04
i tried to have to var set to lookup it still didnt work
David Amanze
@GodKingShogun
Apr 11 2017 03:05
@JLuboff im right next to a gym
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 03:05
@bstahler123 you have to reassign the result variable before you return it
aswell
Jason Luboff
@JLuboff
Apr 11 2017 03:06
@GodKingShogun well I'm working out in a gym.
bstahler123
@bstahler123
Apr 11 2017 03:06
is that in the object or above it?
@HeebieGeeBee sorry not taggin you
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 03:06
you should re assign under the object
Gabriel Moreno
@esclavosoy
Apr 11 2017 03:06
How can I check if a string is in another string? Like is "ell" in string "Hello"
David Amanze
@GodKingShogun
Apr 11 2017 03:06
@JLuboff i could walk 2 secs into a gym from where i am
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 03:06
indexOf
@esclavosoy
@GodKingShogun seems like it would be better if it was further away
David Amanze
@GodKingShogun
Apr 11 2017 03:07
@HeebieGeeBee its pretty quite
Gulsvi
@gulsvi
Apr 11 2017 03:08
@esclavosoy Regular Expressions would help with that
Saboor Malik
@MathematicsCoding
Apr 11 2017 03:08
@GodKingShogun So you have a gym in your home...
David Amanze
@GodKingShogun
Apr 11 2017 03:08
@MathematicsCoding yes
Saboor Malik
@MathematicsCoding
Apr 11 2017 03:08
Nice
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 03:08
@GodKingShogun lol i just meant cus having to walk further would be extra exercise
Saboor Malik
@MathematicsCoding
Apr 11 2017 03:08
Crossfit? Bodybuilding? etc.
Gabriel Moreno
@esclavosoy
Apr 11 2017 03:08
@HeebieGeeBee I tried IndexOf but that didn't seem to work quite right...
David Amanze
@GodKingShogun
Apr 11 2017 03:09
@HeebieGeeBee i read or heard somewhere that walking makes for bad exercise. dont quote me on that
Saboor Malik
@MathematicsCoding
Apr 11 2017 03:09
lol
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 03:09
@GodKingShogun i think you mean jogging
Saboor Malik
@MathematicsCoding
Apr 11 2017 03:09
Yeah
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 03:09
@GodKingShogun walking is very good exercise
Saboor Malik
@MathematicsCoding
Apr 11 2017 03:09
What can you do without walking in public?
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 03:09
@esclavosoy what didnt work about it?
David Amanze
@GodKingShogun
Apr 11 2017 03:10
@HeebieGeeBee do you know why jogging is bad
Gulsvi
@gulsvi
Apr 11 2017 03:10
@esclavosoy
var str = 'hello'
if(/ell/.test(str)) console.log('yes') // yes 'ell' is in 'hello'
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 03:10
@GodKingShogun its high impact and it does this thing to your heart or summin
something scientific
bstahler123
@bstahler123
Apr 11 2017 03:11
@HeebieGeeBee do I have to reassign the result for each key in the object?
Gabriel Moreno
@esclavosoy
Apr 11 2017 03:11
@SkyCoder01 Thanks!!!
CamperBot
@camperbot
Apr 11 2017 03:11
esclavosoy sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:cookie: 974 | @skycoder01 |http://www.freecodecamp.com/skycoder01
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 03:12
no to the object key that is val
well to its value
Vijay
@chvk25
Apr 11 2017 03:12
profile lookup, any help is appreciated

function lookUpProfile(firstName, prop){
// Only change code below this line
for (i=0;i<contacts.length;i++){
if(contacts[i].firstName ===firstName){
if(contacts[i].hasOwnProperty(prop)){
return contacts[i].prop;
}
else {
return "No such property";
}

}else{
  return "No such contact";
}

}

xandelicia
@xandelicia
Apr 11 2017 03:12
hey guys... can anyone help me with the word blanks exercise? I'm kinda new to javascript and I have no idea of what I'm doing
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 03:15
@chvk25 prop is a variable, you need to return no such contact outside the loop
@xandelicia you need to use the parameters of the function along with other words and characters to create a complete sentence that is assigned to a variable that gets returned
Vijay
@chvk25
Apr 11 2017 03:22
I got the no property and no contact correct, but I unable to return prop values @HeebieGeeBee
c0d0er
@c0d0er
Apr 11 2017 03:23
i tried to upload big json file to github, then comes to this message: 413 Request Entity Too Large, nginx, anybody knows how to resolve this problem?
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 03:23
@chvk25 well prop is a variable and youre using the dot notation
and i dont think you have return no such contact correct
Claudio Restifo
@Marmiz
Apr 11 2017 03:26
@c0d0er you really need it uploaded?
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 03:26
@c0d0er how big out out interest?
c0d0er
@c0d0er
Apr 11 2017 03:26
@Marmiz yes, the size is only 2.6 m @HeebieGeeBee
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 03:27
whats in that json file that makes it 2.6mb?
Saboor Malik
@MathematicsCoding
Apr 11 2017 03:28
Could it be...
The site where kids always watching?
c0d0er
@c0d0er
Apr 11 2017 03:28
@HeebieGeeBee map data
Saboor Malik
@MathematicsCoding
Apr 11 2017 03:28
Its
Claudio Restifo
@Marmiz
Apr 11 2017 03:28
@c0d0er usually github allows up to 2gb of file for binary files distribution.
It's odd that you need to have a 2.6MB JSON file that your repo depends on
Saboor Malik
@MathematicsCoding
Apr 11 2017 03:28
that files?!
In
Treylerp
@Treylerp
Apr 11 2017 03:29

if (val <= 25) {
if (val >= 50) {
return "Yes";
}
}

Where would i put the &&

c0d0er
@c0d0er
Apr 11 2017 03:30
@Marmiz @HeebieGeeBee any idea to fix ?
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 03:31
val <= 25 && val >= 50 maybe @Treylerp
@c0d0er no sorry was just curious as ive hosted pretty big sound files
but not that big
Claudio Restifo
@Marmiz
Apr 11 2017 03:31
@c0d0er Your repo really needs it or is just some data needed for functionality (example: is the mock-up data for a react table to show some data)
bstahler123
@bstahler123
Apr 11 2017 03:31
@HeebieGeeBee thanks i got it working finally LOL
CamperBot
@camperbot
Apr 11 2017 03:31
bstahler123 sends brownie points to @heebiegeebee :sparkles: :thumbsup: :sparkles:
:star2: 1253 | @heebiegeebee |http://www.freecodecamp.com/heebiegeebee
bstahler123
@bstahler123
Apr 11 2017 03:31
@HeebieGeeBee helped alot
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 03:32
@bstahler123 yw
c0d0er
@c0d0er
Apr 11 2017 03:32
@Marmiz not really necessary, but still need it, any way to fix?
Claudio Restifo
@Marmiz
Apr 11 2017 03:33
@c0d0er yes don't push it.
github doesn't allow it. I
There's no workaround for it
unless it's a binary
(as far as i know)
Dalton Escoe
@Alenero129
Apr 11 2017 03:37

Hey guys, I'm having some real troubles with this
function titleCase(str) {
str=str.toLowerCase();
str=str.split(' ');
var newstring;

for(var i=0;i<str.length;i++){
str[i][0]=str[i][0].toUpperCase();
}
return str;
}

The error is that I can't assign to a readonly value. Any hints or work around?

HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 03:38
when i was looking they say 100meg is the max file size on github
@Alenero129 strings are immutable
@Alenero129 youre trying to just change the first letter of a string there which you cant do
Dalton Escoe
@Alenero129
Apr 11 2017 03:42
@HeebieGeeBee I see. Changing the first letter was the plan. I guess I'll try coming up with something else to do it
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 03:43
@Alenero129 you're not that far off
its just that you cant just change part of a string
but you can change one string to another string
Dalton Escoe
@Alenero129
Apr 11 2017 03:45
@HeebieGeeBee I could try storing the first letter and then try adding the rest of the string
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 03:46
dont see no need to store it but yeah
thats a good way of thinking is a good idea
c0d0er
@c0d0er
Apr 11 2017 03:51
@Marmiz thanks
CamperBot
@camperbot
Apr 11 2017 03:51
c0d0er sends brownie points to @marmiz :sparkles: :thumbsup: :sparkles:
:cookie: 827 | @marmiz |http://www.freecodecamp.com/marmiz
Gabriel Moreno
@esclavosoy
Apr 11 2017 03:52
@SkyCoder01 How would I check if the letters in the strong "hole" are in the string "hello"?
Sim Randhawa
@iamsimr
Apr 11 2017 03:53
Hi everyone! I'm working on the Twitch.TV JSON API project - anyone free to help me out a bit? It has to do with setting a global array (list? Sorry also trying to learn python so I get the terms mixed up) variable, running a for loop on a function and then pushing results from the for loop onto the array/list variable for use in a separate function.
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 03:54
@iamsimr what are you having a problem with
Sim Randhawa
@iamsimr
Apr 11 2017 03:55
@HeebieGeeBee I set: var array = []
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 03:55
ok
Sim Randhawa
@iamsimr
Apr 11 2017 03:55
then a for loop runs on the list of users, pushing an object {username, game, viewers} to that array
Gabriel Moreno
@esclavosoy
Apr 11 2017 03:56
How would I check if the letters in the strong "hole" are in the string "hello"?
Sim Randhawa
@iamsimr
Apr 11 2017 03:56
however when I call the array out of that function, it returns an empty array (same as my initial declaration)
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 03:56
@esclavosoy indexOf
Saboor Malik
@MathematicsCoding
Apr 11 2017 03:56

function sumAll(arr) {
  return Math.max(arr);
}

sumAll([1, 4]);
Why doesnt it return 4?
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 03:57
can you link your codepen @iamsimr
Gabriel Moreno
@esclavosoy
Apr 11 2017 03:57
@HeebieGeeBee I don't think indexOf would work.
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 03:57
@MathematicsCoding Math.Max i believe
Saboor Malik
@MathematicsCoding
Apr 11 2017 03:57
Nope
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 03:57
@esclavosoy if you use it right it would
Saboor Malik
@MathematicsCoding
Apr 11 2017 03:58
Its .max...
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 03:58
@MathematicsCoding ok
fair enough
Saboor Malik
@MathematicsCoding
Apr 11 2017 03:58
If I do that its not a function
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 03:58
@MathematicsCoding yeah youre right sorry
Saboor Malik
@MathematicsCoding
Apr 11 2017 03:58
:p
Sim Randhawa
@iamsimr
Apr 11 2017 03:59
@MathematicsCoding I may be wrong - I'm a beginner, but is it because Math.max requests two values, not an array with two values?
Saboor Malik
@MathematicsCoding
Apr 11 2017 03:59
Yeah it does but the parameter have two numbers in it
Right?
Sim Randhawa
@iamsimr
Apr 11 2017 04:00
but arr = [1, 4] not 1, 4
like I want to say Math.max(arr[0], arr[1])
would work
Saboor Malik
@MathematicsCoding
Apr 11 2017 04:00
Oh you are right...
actually

function sumAll(arr) {
  return Math.max(...arr);
}

sumAll([1, 4]);
That work too
I just added ...
It actually return 4
Sim Randhawa
@iamsimr
Apr 11 2017 04:01
@MathematicsCoding I'm not familiar with ... syntax
Saboor Malik
@MathematicsCoding
Apr 11 2017 04:01
Not everyone is :p
So for math methods Can I just say max means highest number and min lowest number?
Sim Randhawa
@iamsimr
Apr 11 2017 04:02
@HeebieGeeBee any luck with the codepen I linked?
@MathematicsCoding I think so. max = largest number in a given sequence
Al
@fingrlicknchickn
Apr 11 2017 04:03
// Setup
function phoneticLookup(val) {
  var result = "lookupval";

  // Only change code below this line
  switch(val) {
    case "alpha": 
      result = "Adams";
      break;
    case "bravo": 
      result = "Boston";
      break;
    case "charlie": 
      result = "Chicago";
      break;
    case "delta": 
      result = "Denver";
      break;
    case "echo": 
      result = "Easy";
      break;
    case "foxtrot": 
      result = "Frank";
  }
var lookup = {
  "alpha": "Adams",
  "bravo": "Boston",
  "charlie": "Chicago",
  "delta": "Denver",
  "echo": "Easy",
  "foxtrot": "Frank"
};

  // Only change code above this line
  return result;
}

// Change this value to test
phoneticLookup("charlie");
Vicky Lai
@vickylai
Apr 11 2017 04:03
Seem to be having trouble making my weatherFah div slide in. Anyone? http://codepen.io/vickylaixy/pen/jBXgeR?editors=1010
Al
@fingrlicknchickn
Apr 11 2017 04:04
hey guys im stuck cant figure out how to convert this switch statement in to a lookup
Saboor Malik
@MathematicsCoding
Apr 11 2017 04:04

function sumAll(arr) {
  return arr.reduce();
}

sumAll([1, 4]);
WOuld that return 5?
LeSean Johnson
@leseanbiz
Apr 11 2017 04:05
pretty sure
Saboor Malik
@MathematicsCoding
Apr 11 2017 04:05
But it says undefined..
Gulsvi
@gulsvi
Apr 11 2017 04:05
@esclavosoy You could loop through the string and use .indexOf() as @HeebieGeeBee recommended, or use a regular expression.
Saboor Malik
@MathematicsCoding
Apr 11 2017 04:05
Whats not defined...
heroiczero
@heroiczero
Apr 11 2017 04:06
@MathematicsCoding you need a function in your reduce method
Gulsvi
@gulsvi
Apr 11 2017 04:06
@esclavosoy if(/h|o|l|e/.test('hello')) console.log(true)
LeSean Johnson
@leseanbiz
Apr 11 2017 04:06
@MathematicsCoding pretty sure you need the callback function to tell it how to reduce it. add, sub, must etc
Gabriel Moreno
@esclavosoy
Apr 11 2017 04:07
@HeebieGeeBee @SkyCoder01 if:
```
var one = "hole";
var two = "hello";
one.indexOf(two)
Manish Giri
@Manish-Giri
Apr 11 2017 04:07
@MathematicsCoding reduce() won't work by itself
need a callback
Gulsvi
@gulsvi
Apr 11 2017 04:07
@esclavosoy You would need to loop through and check one letter at a time with .indexOf()
Carlos Zavaleta
@nerdyamigo
Apr 11 2017 04:07
@MathematicsCoding it would be easier is you used map for this, map runs a function that you define into every item in the array
imo
Sim Randhawa
@iamsimr
Apr 11 2017 04:08
Anyone with insight to why I can't update a global variable from within my function?
Gabriel Moreno
@esclavosoy
Apr 11 2017 04:08

@HeebieGeeBee @SkyCoder01 if:

var one = "hole";
var two = "hello";
one.indexOf(two)

This would give me (-1)
How would this help. Am I looking at this wrong?

HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 04:09
@iamsimr it is pushing them into the array
Al
@fingrlicknchickn
Apr 11 2017 04:09
// Setup
function phoneticLookup(val) {
  var result = "";

  // Only change code below this line
  switch(val) {
    case "alpha": 
      result = "Adams";
      break;
    case "bravo": 
      result = "Boston";
      break;
    case "charlie": 
      result = "Chicago";
      break;
    case "delta": 
      result = "Denver";
      break;
    case "echo": 
      result = "Easy";
      break;
    case "foxtrot": 
      result = "Frank";
  }
var lookup = {
  "alpha": "Adams",
  "bravo": "Boston",
  "charlie": "Chicago",
  "delta": "Denver",
  "echo": "Easy",
  "foxtrot": "Frank"
};

  // Only change code above this line
  return result;
}

// Change this value to test
phoneticLookup("charlie");
LeSean Johnson
@leseanbiz
Apr 11 2017 04:09
so, here’s my working code for “Where do i belong”, 2nd to last beginner algo challenge. what do you guys think? how can ii trim it down?
function getIndexToIns(arr, num) {
  arr = arr.sort(function(a,b){return a-b;});
  var count = 0;
  for(var i = 0; i < arr.length; i++){
    if(num <= arr[i] && count === 0){   
      console.log(i);
      num = i;
      count++;
    }else if(num > arr[arr.length -1]){
          return arr.length;}
  }
  return num;
}

getIndexToIns([40, 60], 50);
Sim Randhawa
@iamsimr
Apr 11 2017 04:10
@HeebieGeeBee, yes as long as I am within the scope of the function. As soon as I try to call the array outside (in global scope), it returns: []
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 04:10
@esclavosoy you need to go through each letter
Saboor Malik
@MathematicsCoding
Apr 11 2017 04:10
I will figure out how to use reduce method later..
Good night'
LeSean Johnson
@leseanbiz
Apr 11 2017 04:11
@fingrlicknchickn still having trouble?
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 04:11
@iamsimr console.log array in your ready function
Al
@fingrlicknchickn
Apr 11 2017 04:11
@leseanbiz ye man, im having a brain freeze or something cant figure out what to do
LeSean Johnson
@leseanbiz
Apr 11 2017 04:12
its been a while. lemme look back on it.
Gulsvi
@gulsvi
Apr 11 2017 04:12
@esclavosoy It's much easier to use regular expressions for this
Ryan Haire
@RyaanH
Apr 11 2017 04:12
how do I send my code as the editor here?
Sim Randhawa
@iamsimr
Apr 11 2017 04:13
@HeebieGeeBee, still getting [] as the output
'''
CamperBot
@camperbot
Apr 11 2017 04:13
:bulb: to format code use backticks! ``` more info
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 04:13
@iamsimr feck lol me too now i refreshed
Sim Randhawa
@iamsimr
Apr 11 2017 04:13
```
LeSean Johnson
@leseanbiz
Apr 11 2017 04:14
@fingrlicknchickn whats the exact name of that exercise??
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 04:14
i must have done something when trying to debug
Manish Giri
@Manish-Giri
Apr 11 2017 04:14
@leseanbiz there's a much easier way to solve that challenge..
Sim Randhawa
@iamsimr
Apr 11 2017 04:14
sorry trying to figure out formatting lol
Al
@fingrlicknchickn
Apr 11 2017 04:14
@leseanbiz Using Objects for Lookups
Ryan Haire
@RyaanH
Apr 11 2017 04:14
``` code
LeSean Johnson
@leseanbiz
Apr 11 2017 04:15
@Manish-Giri yeah, thats why i was posting the code here for review
Sim Randhawa
@iamsimr
Apr 11 2017 04:15
@HeebieGeeBee if you console.log(array) inside the dataReceived function - you get the output
LeSean Johnson
@leseanbiz
Apr 11 2017 04:15
is it part of sort?
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 04:15
@iamsimr oh i might have done that
Ryan Haire
@RyaanH
Apr 11 2017 04:15

function repeatStringNumTimes(str, num) {
  var arr = [];
  for(var i = 0; i <= num; i++){
    arr.push(str + str * i);
  }
  return arr.join('');
  //return str + str * num;
}

repeatStringNumTimes("abc", 3);
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 04:15
lol sorry 6 am here
Sim Randhawa
@iamsimr
Apr 11 2017 04:16
@HeebieGeeBee - no worries. I know my understanding of JS is hurting me here but it'll come in time
Ryan Haire
@RyaanH
Apr 11 2017 04:16
why does my output add 'NaN' to the end of my strings?
Darth Skywalker
@adityaparab
Apr 11 2017 04:16
@RyaanH This is wrong.. .you'll get NaN
Ryan Haire
@RyaanH
Apr 11 2017 04:16
@adityaparab I get the strings right but its like abcNaNabcNaNabcNaN
Darth Skywalker
@adityaparab
Apr 11 2017 04:16
all you have to do is arr.push(str);
Manish Giri
@Manish-Giri
Apr 11 2017 04:16
@leseanbiz try this
function getIndexToIns(arr, num) {
  arr.push(num);
  arr.sort((a, b) => a- b);
  return arr.indexOf(num);
}
getIndexToIns([40, 60], 50);
Ryan Haire
@RyaanH
Apr 11 2017 04:17
ohhh true ok thanks @adityaparab
CamperBot
@camperbot
Apr 11 2017 04:17
ryaanh sends brownie points to @adityaparab :sparkles: :thumbsup: :sparkles:
:cookie: 976 | @adityaparab |http://www.freecodecamp.com/adityaparab
Ryan Haire
@RyaanH
Apr 11 2017 04:17
that was sad
Darth Skywalker
@adityaparab
Apr 11 2017 04:17
@RyaanH Also, you loop control condition is wrong. it should be i<num not i<=num
LeSean Johnson
@leseanbiz
Apr 11 2017 04:18
@fingrlicknchickn so, lookup bracket notation. you have to pass the argument to the lookup table ad that’s how you do it.
Darth Skywalker
@adityaparab
Apr 11 2017 04:18
@RyaanH Also, instead of return arr.join('') do return num > 0 ? arr.join('') : '';
Sim Randhawa
@iamsimr
Apr 11 2017 04:19
@HeebieGeeBee so from Googling around I think it has to do with asynchronous nature of the function
LeSean Johnson
@leseanbiz
Apr 11 2017 04:19
@Manish-Giri will do
thanks!
Sim Randhawa
@iamsimr
Apr 11 2017 04:20
When I output array to console, it's not done sequentially as I'm expecting
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 04:20
@iamsimr yes i was trying to figure out which way to do it
Al
@fingrlicknchickn
Apr 11 2017 04:20
ye i got that i just dont know what the exact code is ,cant figure it out @leseanbiz
that’s a pretty good explanation of it. it shows an example of the call toward the bottom
@Manish-Giri so => in this context isnt a compa
comparison, right?
thats the arrow notation that’s new in ES6, right?
Manish Giri
@Manish-Giri
Apr 11 2017 04:23
it's just a shorthand for writing .sort(function(a,b) {return a -b;})
yes
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 04:24
@iamsimr think you might need to use a promise
LeSean Johnson
@leseanbiz
Apr 11 2017 04:24
and you’re just pushing the the value in to the array, sorting then returning it’s index. yes, much easier….thanks lol
Al
@fingrlicknchickn
Apr 11 2017 04:24
@leseanbiz i still dont get it
Manish Giri
@Manish-Giri
Apr 11 2017 04:24
:+1:
Sim Randhawa
@iamsimr
Apr 11 2017 04:24

@HeebieGeeBee I'm off to sleep on it
It's a problem for tomorrow me.

I have no idea what a promise is lol

Gilbert
@gilbertp97
Apr 11 2017 04:24

LeSean Johnson
@leseanbiz
Apr 11 2017 04:24
@Manish-Giri thanks!
CamperBot
@camperbot
Apr 11 2017 04:24
leseanbiz sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 5104 | @manish-giri |http://www.freecodecamp.com/manish-giri
Darth Skywalker
@adityaparab
Apr 11 2017 04:24

Just a note.. there are significant contextual differences between

something.doSomething(x => x)

and

something.doSomething(function(x){
  return x
});
Gilbert
@gilbertp97
Apr 11 2017 04:24
var count = 0;

function cc(card) {
  // Only change code below this line
  switch(card){
    case 2:
    case 3:
    case 4:
    case 5:
    case 6:
      count+=1;
      break;
    case 7:
    case 8:
    case 9:
      count = 0;
      break;
    case 10:
    case 'J':
    case 'Q':
    case 'K':
    case 'A':
      count-=1;
      break;
  }
  if (count > 0){
    return count + " Bet";
  }
  else 
  return count + " Hold";
  // Only change code above this line
}

// Add/remove calls to test your function.
// Note: Only the last will display
cc(2); cc(3); cc(7); cc('K'); cc('A');
hello friends
why is my case 7 8 and 9 making my work invalid
Manish Giri
@Manish-Giri
Apr 11 2017 04:24
@gilbertp97 count = 0; is wrong
why're you setting it to 0?
Al
@fingrlicknchickn
Apr 11 2017 04:25
am i supposed to write function and return inside evry propertie? @leseanbiz
LeSean Johnson
@leseanbiz
Apr 11 2017 04:25
@fingrlicknchickn you have to use the bracket notation inside of your function, passing it the argument, and returning the result.
Gilbert
@gilbertp97
Apr 11 2017 04:25
it says if count = 0 the cards are 7 8 9
Manish Giri
@Manish-Giri
Apr 11 2017 04:25
@gilbertp97 no
Gilbert
@gilbertp97
Apr 11 2017 04:25
oh nvm
i think i know
Manish Giri
@Manish-Giri
Apr 11 2017 04:25
if cards are 7,8,9 you don't change count
Gilbert
@gilbertp97
Apr 11 2017 04:26
yes @Manish-Giri
@Manish-Giri thank you for the help
CamperBot
@camperbot
Apr 11 2017 04:26
gilbertp97 sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 5105 | @manish-giri |http://www.freecodecamp.com/manish-giri
Manish Giri
@Manish-Giri
Apr 11 2017 04:26
:+1:
Al
@fingrlicknchickn
Apr 11 2017 04:28
@leseanbiz ok can u stupidfy that sentence, explain it to me like im an totall idiot, cuz i cant understand at all
i made the lookup table
its correct right?
what do i do after that
cameron nicklaus
@camnicklaus
Apr 11 2017 04:29
anybody feel up for helping me with recursion/minmax algorithm? I've got a pen that I thought was working but it only when I simulate an almost finished game board
Sim Randhawa
@iamsimr
Apr 11 2017 04:30
@HeebieGeeBee thanks! I'll check that out tomorrow
another resource I plan on checking that offers hope: https://benohead.com/javascript-variables-asynchronous-callback-functions/
CamperBot
@camperbot
Apr 11 2017 04:30
iamsimr sends brownie points to @heebiegeebee :sparkles: :thumbsup: :sparkles:
:star2: 1254 | @heebiegeebee |http://www.freecodecamp.com/heebiegeebee
Al
@fingrlicknchickn
Apr 11 2017 04:30
call the lookuptable passing the parameter and then saving that in a variable or
wtf is this lookup shit im getting so confused
LeSean Johnson
@leseanbiz
Apr 11 2017 04:30
now all you have to do is….inside of the function access it. to do that youu need to use the bracket notation from the link i posted
lookupTable"condition"
in the format of
yourtablename[argument];
Gulsvi
@gulsvi
Apr 11 2017 04:31
@iamsimr promises are going to be very hard and unnecessary for Twitch
LeSean Johnson
@leseanbiz
Apr 11 2017 04:31
then…yes "call the lookuptable passing the parameter and then saving that in a variable or"
Gulsvi
@gulsvi
Apr 11 2017 04:31
Use a forEach loop with a callback, and place additional API calls inside the success callback of the first. It will all work great @iamsimr
LeSean Johnson
@leseanbiz
Apr 11 2017 04:31
this aint easy we all know that
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 04:32
@SkyCoder01 yeah thats what i did
Gulsvi
@gulsvi
Apr 11 2017 04:32
Easiest way to do it ^^
Steve Snyder
@ktrn149
Apr 11 2017 04:32
I'm working on the "Write Reusable JavaScript with Functions" exercise on the JS course

Is there a mistake in this code?

function resusableFunction() {
console.log("Hi World");
}

resusableFunction();

HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 04:33
im all about easiest
Steve Snyder
@ktrn149
Apr 11 2017 04:33
Just trying to figure out what's wrong...
LeSean Johnson
@leseanbiz
Apr 11 2017 04:33
@ktrn149 what error is it giving you?
Al
@fingrlicknchickn
Apr 11 2017 04:34
@leseanbiz if u dont mind cant u just send me the line of code, ive been stuck on this shit for over 30 min,
Al
@fingrlicknchickn
Apr 11 2017 04:34
i still cant make it work
Steve Snyder
@ktrn149
Apr 11 2017 04:34
"reusableFunction is not defined"
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 04:35
@ktrn149 check your spelling
LeSean Johnson
@leseanbiz
Apr 11 2017 04:35
@fingrlicknchickn i msg’d you
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 04:36
though i do like the idea of a resusable function
Steve Snyder
@ktrn149
Apr 11 2017 04:36
haha
thanks @HeebieGeeBee
CamperBot
@camperbot
Apr 11 2017 04:36
ktrn149 sends brownie points to @heebiegeebee :sparkles: :thumbsup: :sparkles:
:star2: 1255 | @heebiegeebee |http://www.freecodecamp.com/heebiegeebee
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 04:37
@cantdocpp @silvercrw1994 you might to be a little more elaborative than just saying help
philip bryan
@cantdocpp
Apr 11 2017 04:37

// Setup
function abTest(a, b) {
// Only change code below this line
if ((a || b) < 0) {
return "undefined";
} else {

// Only change code above this line

return Math.round(Math.pow(Math.sqrt(a) + Math.sqrt(b), 2));
}
}
// Change values below to test your code
abTest(-2,2);

i think my code is working, but i still can't pass the test
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 04:38
@cantdocpp that conditional isnt correct
Jason Luboff
@JLuboff
Apr 11 2017 04:38
Your code is incorrect
philip bryan
@cantdocpp
Apr 11 2017 04:38
which one ?
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 04:38
and undefined is a keyword not a string
Jason Luboff
@JLuboff
Apr 11 2017 04:38
Bad condition
Heathercoraje
@Heathercoraje
Apr 11 2017 04:38
Hello world :P
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 04:39
hello
philip bryan
@cantdocpp
Apr 11 2017 04:39
still don't understand XD
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 04:39
@JLuboff youre still here
Heathercoraje
@Heathercoraje
Apr 11 2017 04:39
Can anyone give me a hand maybe?
Roxroy
@roxroy
Apr 11 2017 04:39
@Heathercoraje , welcome to the chat
Mike Boardley
@Boardley
Apr 11 2017 04:39
@Heathercoraje - Hello :)
@Heathercoraje - What do yoyu need?
Heathercoraje
@Heathercoraje
Apr 11 2017 04:39
I am doing Escape Sequences in Strings;
Jason Luboff
@JLuboff
Apr 11 2017 04:39
@HeebieGeeBee eh, looking st the chat here and there while I game lol
More like you're still here
Heathercoraje
@Heathercoraje
Apr 11 2017 04:40
my code is
Jason Luboff
@JLuboff
Apr 11 2017 04:40

heebieneversleeps

Heathercoraje
@Heathercoraje
Apr 11 2017 04:40
var myStr = 'FirstLine\n\SecondLine\\rThirdLine';
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 04:40
*at conventional times
Jason Luboff
@JLuboff
Apr 11 2017 04:40
Agh...stupid hashtag. And stupid mobile doesn't let me edit
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 04:40
lol
Heathercoraje
@Heathercoraje
Apr 11 2017 04:40
it doesn't show me what I want to achieve
FirstLine
\SecondLine\
ThirdLine
cameron nicklaus
@camnicklaus
Apr 11 2017 04:40
here's my codepen if anybody feels like digging into some recursion :( at the bottom is the pseudo game I'm passing. the function logs the calculated best move.
http://codepen.io/camnicklaus/pen/jBgggy?editors=0010
Heathercoraje
@Heathercoraje
Apr 11 2017 04:40
which is this
cameron nicklaus
@camnicklaus
Apr 11 2017 04:41
fyi, there's no html interface working yet
Roxroy
@roxroy
Apr 11 2017 04:42
@Heathercoraje , to you need to escape the slashes for \secondline\ by add 2 slashed before each one
Jason Luboff
@JLuboff
Apr 11 2017 04:42
@HeebieGeeBee ya conventional times is right. I'll never know how you do it :smile: do you have black out curtains or anything to block the sun when you sleep during the day?
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 04:42
@Heathercoraje it wont show it like that in the freecodecamp console, but your code looks right, did you pass the challenge?
@JLuboff nope
@cantdocpp look again how make conditionals using the || operator
@JLuboff if youre tired enough you'll sleep during the say
Heathercoraje
@Heathercoraje
Apr 11 2017 04:43
@roxroy a bit lost. where exactly?
@HeebieGeeBee I did pass the challenges but it just doesn't show right on the left side
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 04:44
@Heathercoraje yeah it wont
Mike Boardley
@Boardley
Apr 11 2017 04:44
@Heathercoraje
var myStr; // Change this line

myStr = "FirstLine\n\\SecondLine\\\rThirdLine";
Heathercoraje
@Heathercoraje
Apr 11 2017 04:45
@Boardley That's what I have as well.
Tanushree Samanta
@TSamanta
Apr 11 2017 04:45
has anyone worked with wikipedia api?
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 04:45
@Heathercoraje your code is fine and youve done it all correct hence passing the challenge
Mike Boardley
@Boardley
Apr 11 2017 04:45
@Heathercoraje - I know. I checked my solution and that is what I have too
Roxroy
@roxroy
Apr 11 2017 04:45
@Heathercoraje , to you need to escape the slashes for \secondLine\ by add 2 slashed before each one.
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 04:46
@roxroy her extra slashes arent showing becuase her code isnt in markup the chat removed them
jaganjaan
@jaganjaan
Apr 11 2017 04:46
once i click a button some function work ,again click the same button same function want to stop???
Heathercoraje
@Heathercoraje
Apr 11 2017 04:46
that's why I can't see them correctly?
jaganjaan
@jaganjaan
Apr 11 2017 04:46
anyone help me
Roxroy
@roxroy
Apr 11 2017 04:46
@HeebieGeeBee , right.. I see
Manish Giri
@Manish-Giri
Apr 11 2017 04:46
@TSamanta :hand:
Heathercoraje
@Heathercoraje
Apr 11 2017 04:47
Thank you anyway
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 04:47
@Heathercoraje the freecodecamp console jstu wont print out the string with the new line and carriage return
jaganjaan
@jaganjaan
Apr 11 2017 04:47
inside a function toggle message display
Jason Luboff
@JLuboff
Apr 11 2017 04:47
@HeebieGeeBee ya that's true.
Heathercoraje
@Heathercoraje
Apr 11 2017 04:48
it tried on another console in different challenge it shows me correctly.
I was digging it looking at the codes for 15+mins lol
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 04:48
@Heathercoraje yes its just for this particular challenge
Heathercoraje
@Heathercoraje
Apr 11 2017 04:48
Thank you.
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 04:50
@Heathercoraje if you pass the challenge when you run the test, it usually means you ave done everything right
@jaganjaan got a codepen or anything?
jaganjaan
@jaganjaan
Apr 11 2017 04:53
@HeebieGeeBee thanx
CamperBot
@camperbot
Apr 11 2017 04:53
jaganjaan sends brownie points to @heebiegeebee :sparkles: :thumbsup: :sparkles:
:star2: 1256 | @heebiegeebee |http://www.freecodecamp.com/heebiegeebee
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 04:53
i didnt do anything
Sam Houlahan
@Sam-Houlahan
Apr 11 2017 04:54

hey guys im trying to do the wikipedia viewer project. Currently im trying to just get it to do a basic search here is my current js code : function search() {
// Use Ajax to handle things
$.ajax({
url: 'https://en.wikipedia.org/w/api.php?action=query&list=search&format=json&srsearch=' + $('#search').val(),
dataType: 'jsonp',
type: 'POST',
headers: {
'Api-User-Agent': 'Example/1.0'
},
success: function(data) {

console.log(data);
}
})
}

$('#search').keypress(function(e){
if(e.which == 13){//Enter key pressed
search();
}
});

Tanushree Samanta
@TSamanta
Apr 11 2017 04:55
@Manish-Giri what would you do to get autocomplete in your search box
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 04:55
@Sam-Houlahan have you declared that function?
Tanushree Samanta
@TSamanta
Apr 11 2017 04:56
actually I do have many queries :worried:
Dave Hennessey
@davelops
Apr 11 2017 04:56
I just finished the cardcount javascript challenge where i had to use count++ and count--, but i dont recall being taught these first.
Tanushree Samanta
@TSamanta
Apr 11 2017 04:56
about the entire way it works
Sam Houlahan
@Sam-Houlahan
Apr 11 2017 04:56
Yes @HeebieGeeBee the function is search() ?
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 04:57
function search() { ......
Markus Kiili
@Masd925
Apr 11 2017 04:57
@HeebieGeeBee Morning.
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 04:57
@Masd925 mornin
Sam Houlahan
@Sam-Houlahan
Apr 11 2017 04:57
yes that is correct.
Dave Hennessey
@davelops
Apr 11 2017 04:57
perhaps adding those as a lesson before requiring them might be helpful
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 04:58
@Sam-Houlahan so youve actually got function written in your code?
Sam Houlahan
@Sam-Houlahan
Apr 11 2017 04:58
so I am a bit confused as to why it wont console log a basic search.
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 04:58
you just didnt paste it
oh lol
Manish Giri
@Manish-Giri
Apr 11 2017 04:58
@TSamanta um..not sure how you would implement autocomplete in that, the user can literally type anything..
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 04:59
i see the function now it was at the end of the sentence
@Sam-Houlahan sorry been up a long time
Sam Houlahan
@Sam-Houlahan
Apr 11 2017 04:59
Yes I also have search(); in the top to test the function is actually working however Im trying to get it to work off the word im putting in the search box once i press the 'enter' key.
Bryan Reese
@breese8009
Apr 11 2017 05:00
@Sam-Houlahan do u have a search value in there to test the code?
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 05:00
@Sam-Houlahan got your codepen?
Tanushree Samanta
@TSamanta
Apr 11 2017 05:00
wait check thiscodepen out
Sam Houlahan
@Sam-Houlahan
Apr 11 2017 05:00
yes i am putting in a search value each time.
i will put it on codepen 1 sec.
@Manish-Giri
check this out
Jason Luboff
@JLuboff
Apr 11 2017 05:02
@Masd925 @HeebieGeeBee good night fellas
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 05:02
@JLuboff night
Markus Kiili
@Masd925
Apr 11 2017 05:02
@JLuboff night
Manish Giri
@Manish-Giri
Apr 11 2017 05:03
@TSamanta cool, they must have an API for that, probably.
Bryan Reese
@breese8009
Apr 11 2017 05:05
@Sam-Houlahan are u wanting to POST??
orrrr do u want to get data?
philip bryan
@cantdocpp
Apr 11 2017 05:07
@TSamanta you're a genius
devpaaji
@devpaaji
Apr 11 2017 05:09
@Masd925 good morning friend
Markus Kiili
@Masd925
Apr 11 2017 05:10
@devpaaji Morning.
Tanushree Samanta
@TSamanta
Apr 11 2017 05:11
@Manish-Giri also do you know about an api which gets only the content and not the pictures and stuff
@cantdocpp haha! that's not my pen
Sam Houlahan
@Sam-Houlahan
Apr 11 2017 05:13
https://codepen.io/keewhy/pen/rmBVEP . Here is my current code guys.
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 05:13
@Sam-Houlahan im getting data logged
Tanushree Samanta
@TSamanta
Apr 11 2017 05:14
@Sam-Houlahan the type is POST and not get
Ogundele Olumide
@Lumexralph
Apr 11 2017 05:15
@HeebieGeeBee @Masd925 Good morning
Markus Kiili
@Masd925
Apr 11 2017 05:15
@Lumexralph Morning.
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 05:15
@Lumexralph mornin
Sam Houlahan
@Sam-Houlahan
Apr 11 2017 05:16
I tried changing it to GET no difference.
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 05:16
@Sam-Houlahan whats the problem?
@Sam-Houlahan when i enter a search item and press enter i see the objects in the console
Sam Houlahan
@Sam-Houlahan
Apr 11 2017 05:17
Okay so i am wanting the api to search the value that i put in the search box after i press enter.
rugano
@rugano
Apr 11 2017 05:17
Hello campers!
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 05:17
@Sam-Houlahan it is
Sam Houlahan
@Sam-Houlahan
Apr 11 2017 05:17
are the objects you are searching related to the value you put in?
HeebieGeeBee
@HeebieGeeBee
Apr 11 2017 05:17
yeah
Sam Houlahan
@Sam-Houlahan
Apr 11 2017 05:17
take out the search(); from the top and see if it works.
what are you console logging to see this it doesnt work for me :(
Yasir Rashid
@yasir206
Apr 11 2017 05:20
Hello world
Sam Houlahan
@Sam-Houlahan
Apr 11 2017 05:20
Okay hmm its working on codepen but not locally on my machine doesnt console log any results.
LeSean Johnson
@leseanbiz
Apr 11 2017 05:20
can i combine .fromCharCode() & . join()?
HeebieGeeBee
@HeebieGeeBee