These are chat archives for FreeCodeCamp/HelpJavaScript

13th
Sep 2017
Bhoomi Khanderia
@bhoomikhanderia
Sep 13 2017 00:01
@Chrono79 : Thank you! Will try that. :smile:
Nick Cleary
@Hijerboa
Sep 13 2017 00:23
For the binary agents challenge, am I missing something? Because the "helpful links" provided on the challenge don't seem to be enough to solve the issue
Because simply separating the string and trying to find its char code, then converting back into english doesn't seem to work
Gersho
@Gersho
Sep 13 2017 00:25
that's what you're supposed to do, where do you have troubles ?
did you use the parseInt ?
Nick Cleary
@Hijerboa
Sep 13 2017 00:26
...
There's litterally no mention of that on the page
Gersho
@Gersho
Sep 13 2017 00:27
how else were you planning to convert from binary to decimal ?
Nick Cleary
@Hijerboa
Sep 13 2017 00:28
.... I may or may not have just learned that parseInt exists about 50 seconds ago
Gersho
@Gersho
Sep 13 2017 00:30
it happens (a lot) i found it when googling how i would convert binary
Nick Cleary
@Hijerboa
Sep 13 2017 00:31
@Gersho so this parsed = parseInt(str[i], 10); should work?
welp that's still returning binary
Gersho
@Gersho
Sep 13 2017 00:33
parsed should be decimal
legendinraze
@legendinraze
Sep 13 2017 00:34
function findWaldo(str) {
  var waldoPosition;
  // Code below here
 str.indexOf ("I'm a little tea pot. Waldo is a big tea pot." );
  return waldoPosition;
}
what's wrong
Nick Cleary
@Hijerboa
Sep 13 2017 00:34
@Gersho ah nvm the 10 should have been a 2 :/
thanks mate
legendinraze
@legendinraze
Sep 13 2017 00:35
arr.push(["dog", 3]);
this one sorry
Nick Cleary
@Hijerboa
Sep 13 2017 00:35
@Gersho thank you... (yo camper bot give him brownies)
CamperBot
@camperbot
Sep 13 2017 00:35
hijerboa sends brownie points to @gersho :sparkles: :thumbsup: :sparkles:
:cookie: 425 | @gersho |http://www.freecodecamp.com/gersho
Nick Cleary
@Hijerboa
Sep 13 2017 00:35
@legendinraze what are you trying to do
legendinraze
@legendinraze
Sep 13 2017 00:35

An easy way to append data to the end of an array is via the push() function.

.push() takes one or more parameters and "pushes" them onto the end of the array.

var arr = [1,2,3];
arr.push(4);
// arr is now [1,2,3,4]

Gersho
@Gersho
Sep 13 2017 00:36
@Hijerboa oh right should be 2, didn't notice either xD
Nick Cleary
@Hijerboa
Sep 13 2017 00:36
@legendinraze are you trying to push the ["dog", 3] ?
legendinraze
@legendinraze
Sep 13 2017 00:36
ya
Nick Cleary
@Hijerboa
Sep 13 2017 00:36
So essentially what you're doing rn is pushing an array into an array
you're going to need two separate statements i believe
legendinraze
@legendinraze
Sep 13 2017 00:37
ok
Nick Cleary
@Hijerboa
Sep 13 2017 00:37
so arr.push("dog"); and arr.push(3);
legendinraze
@legendinraze
Sep 13 2017 00:37
didnt work
I think it is all one line not two
Nick Cleary
@Hijerboa
Sep 13 2017 00:38
yeah I think you are right
I'm looking at the challenge now
legendinraze
@legendinraze
Sep 13 2017 00:39
I looks like it should be right though doesn't it?
It*
Nick Cleary
@Hijerboa
Sep 13 2017 00:39
@legendinraze i think i see your issue
Moisés Man
@moigithub
Sep 13 2017 00:39
arr = [1,2,3]
arr.push("dog") will became [1,2,3,"dog"]
while
arr.push( ["dog"] ) <-- notice the brackets
will became [1,2,3, ["dog"] ]
Nick Cleary
@Hijerboa
Sep 13 2017 00:39
you're pushing it to arr
but you should be pushing it to myArray
do it all in one statement and it should work
legendinraze
@legendinraze
Sep 13 2017 00:40
you're right I got it.
Nick Cleary
@Hijerboa
Sep 13 2017 00:40
:D
legendinraze
@legendinraze
Sep 13 2017 00:40
Thanks @Hijerboa
CamperBot
@camperbot
Sep 13 2017 00:40
legendinraze sends brownie points to @hijerboa :sparkles: :thumbsup: :sparkles:
:cookie: 291 | @hijerboa |http://www.freecodecamp.com/hijerboa
Nick Cleary
@Hijerboa
Sep 13 2017 00:41
np mate
legendinraze
@legendinraze
Sep 13 2017 01:11

Return the remaining elements of an array after chopping off n elements from the head.

The head means the beginning of the array, or the zeroth index. help

please
slasher([1, 2, 3], 2) should return [3].
slasher([1, 2, 3], 0) should return [1, 2, 3].
slasher([1, 2, 3], 9) should return [].
slasher([1, 2, 3], 4) should return [].
slasher(["burgers", "fries", "shake"], 1) should return ["fries", "shake"].
slasher([1, 2, "chicken", 3, "potatoes", "cheese", 4], 5) should return ["cheese", 4].
function slasher(arr, howMany) {
  // it doesn't always pay to be first
  return arr;
}

slasher([1, 2, 3], 2);
slasher([1, 2, 3], 0);
Diego Mayer
@Chrono79
Sep 13 2017 01:14
@legendinraze have you checked what splice does?
legendinraze
@legendinraze
Sep 13 2017 01:14
ya
Diego Mayer
@Chrono79
Sep 13 2017 01:15
then try to use it, if it doesn't work, we'll see why not
legendinraze
@legendinraze
Sep 13 2017 01:15
ok
legendinraze
@legendinraze
Sep 13 2017 01:22
var a = (["zero", "One", "Two"], 3);
var sliced = a.slice[3];
function slasher(arr, howMany) {
  // it doesn't always pay to be first
  return arr;
}

slasher([1, 2, 3], 2);
I don't get it
@Chrono79
Gersho
@Gersho
Sep 13 2017 01:22
wow
why is it not inside your function ?
Moisés Man
@moigithub
Sep 13 2017 01:25
slice is a method / function
soo.. to CALL it /pass params u use ( ) not []
also not sure wht first line is :D
Gersho
@Gersho
Sep 13 2017 01:26
hadn't even noticed
a test exemple ?
legendinraze
@legendinraze
Sep 13 2017 01:26
still wrong
Diego Mayer
@Chrono79
Sep 13 2017 01:42
@legendinraze the first line is wrong (the second is wrong too)
var a = ['zero', 'one', 'two', 'three'];
var sliced = a.slice(1, 3);

console.log(a);      // ['zero', 'one', 'two', 'three']
console.log(sliced); // ['one', 'two']
Your code should be inside the function
Read that link, specially the Parameters part (note that both are optional)
Zhang LIn
@zl-cheetah
Sep 13 2017 02:22
image.png
korzo
@korzo
Sep 13 2017 02:36
@zl-cheetah I suppose
this.setGear = function(arg) {
    gear = arg;
}
Zhang LIn
@zl-cheetah
Sep 13 2017 02:43
Thank you for your help
Eric Hasegawa
@EricHasegawa
Sep 13 2017 03:27
Can anyone tell me why this doesn't work? It's the "Search and Replace" Challenge
function myReplace(str, before, after) {
/*  var splitStr = str.split(" ");
  for (var i=0; i < splitStr.length; i++ ) {
    if (splitStr[i] == before) {
      splitStr.replace(before,after);
    }
  }
  return splitStr;
}
*/
  var splitStr = str.split(" ");
  var index = splitStr.indexOf(before);
  var slicedStr = after.slice(1,after.length);
 if (before[0] === before[0].toUpperCase()) {
  after = after[0].toUpperCase + slicedStr ;
  }
//The problem is with the capital letter challenges, fix this and it'll work. 
if (index !== -1) {
    splitStr[index] = after;
}
  return splitStr.join(" ");

}
myReplace("He is Sleeping on the couch", "Sleeping", "sitting");
The commented out code is another possible solution that I ditched
Oh nevermind, dumb mistake my bad
horo
@wolfHoro
Sep 13 2017 03:48
$(document).ready(function (position) {
  $('#getweather').on('click', function () {
    getUserInfo();
    function getUserInfo() {
      navigator.geolocation.getCurrentPosition(showeather);
    }
    function showeather(position) {
      var location = position.coords.latitude + ',' + position.coords.longitude;
      var ipaddress;
      var apiLinkDS = 'https://cors-anywhere.herokuapp.com/https://api.darksky.net/forecast/8df2462b1f09c11dc2082b939ab335b2/' + location + '?lang=zh';
      var apiLinkTC = 'http://apis.map.qq.com/ws/location/v1/ip/?ip=' + ipaddress + '&key=4ZVBZ-KAOKU-WVRVW-22ZML-7OMJZ-KOFY6';
      var apiLinkIP = 'https://freegeoip.net/json/'
      getlocationIP(apiLinkIP);
      getweatherAPI(apiLinkDS);
      getlocalname(apiLinkTC);
      function locationIP(apiLinkIP) {
        fetch(apiLinkIP, {
          method: 'GET'
        }).then(function (data) {
          ipaddress = data.ip;
        })
      }
      function getlocalname(apiLinkTC) {
        fetch(apiLinkTC, {
          method: 'GET',
        }).then(function (data) {
          alert(data);
          $('.car-title').html(data.result.ad_info.city);
        })
      }
      function getweatherAPI(apiLinkDS) {
        alert(apiLinkDS);
        fetch(apiLinkDS, {
          method: 'GET',
        }).then(function (response) {
          return response.json()
        }).then(function (data) {
          $('.btn').html(data.currently.summary);
        });
      }
    }
  });
});
What's wrong with my code? Even API providers can not receive my request
Greg Duncan
@GregatGit
Sep 13 2017 05:01
@wolfHoro are you passing in the showweather function to getUserInfo?
Markus Kiili
@Masd925
Sep 13 2017 05:06
@wolfHoro You don't need position here $(document).ready(function (position) { <-
Greg Duncan
@GregatGit
Sep 13 2017 05:06
@wolfHoro you have a lot of jumping around - it is hard to follow where you code goes - make sure all your varibles are in scope for all the function and use camelCase on all your functions, not just one
Randell Dawson
@RandellDawson
Sep 13 2017 05:10
@wolfHoro - You need to take a look at your console for many errors. If you are using Chrome press Ctrl+Shft+I
korzo
@korzo
Sep 13 2017 05:11
@wolfHoro You have function locationIP, but you call getlocationIP()
piteto
@piteto
Sep 13 2017 05:12
lol, there's a point where there are too many cooks in the kitchen...
Randell Dawson
@RandellDawson
Sep 13 2017 05:13
Welcome to Gitter!
piteto
@piteto
Sep 13 2017 05:13
;)
Randell Dawson
@RandellDawson
Sep 13 2017 05:15
@wolfHoro - Instead of trying 3 different methods, why don't you focus on one and figure out why one may not be working as you expect? By the way, if you comment the call above and below getweatherAPI(apiLinkDS); you will see it does get something back.
piteto
@piteto
Sep 13 2017 05:18
while you're all here, any suggestions on how to keep my hour/second hands a little more anchored in the center? The issue is more noticeable when the second hand is pointing down. https://codepen.io/anon/pen/rGNWKZ?editors=0100
maybe some math I need to do with left/right positioning based on the rotation angle?
It's been a while since I took geometry or trig :joy: and I'm at my whit's end fiddling around with it lol
wzq94
@wzq94
Sep 13 2017 06:42
Accessing Nested Arrays in JSON
Petru Conduraru
@bluecondor
Sep 13 2017 07:18
find lookup profile
CamperBot
@camperbot
Sep 13 2017 07:18
find lookup profile
nothing found
Petru Conduraru
@bluecondor
Sep 13 2017 07:18
find profile lookup
CamperBot
@camperbot
Sep 13 2017 07:18
find profile lookup
nothing found
Petru Conduraru
@bluecondor
Sep 13 2017 07:18
find lookup
CamperBot
@camperbot
Sep 13 2017 07:18
find lookup
nothing found
Petru Conduraru
@bluecondor
Sep 13 2017 07:18
wiki profile
CamperBot
@camperbot
Sep 13 2017 07:18

freeCodeCamp Wiki:

:point_right: The freeCodeCamp wiki can be found on our forum.
Please follow the link and search there.
horo
@wolfHoro
Sep 13 2017 07:40
$(document).ready(function(position){
  $("#getweather").on("click", function(){
getUserInfo();
function getUserInfo(){
    navigator.geolocation.getCurrentPosition(showeather);
}    
   function showeather(position){
    var location= position.coords.latitude + "," + position.coords.longitude;
    var ipaddress;
    var apiLinkDS = "https://cors-anywhere.herokuapp.com/https://api.darksky.net/forecast/8df2462b1f09c11dc2082b939ab335b2/" + location+"?lang=zh"; 
    var apiLinkTC="https://apis.map.qq.com/ws/location/v1/ip/?ip="+ipaddress+"&key=4ZVBZ-KAOKU-WVRVW-22ZML-7OMJZ-KOFY6";
     var apiLinkIP="freegeoip.net/json";
   getlocationIP(apiLinkIP);
   getweatherAPI(apiLinkDS);
   getlocalname(apiLinkTC);

   }
   function  getlocationIP(apiLinkIP){
        fetch(apiLinkIP,{'mode': 'no-cors'}).then(function(response){
           if(response.status!==200){
              console.log('please check.');}else{
              return response.json();}
            }).then(function(data){
                ipaddress=data.ip;
            });
     }
     function getweatherAPI(apiLinkDS){
         fetch(apiLinkDS,{
             method:"GET"
         }).then(function(response){
             if(response.status!==200){
                 console.log('please check.');}else{
               return response.json();
            }
             }).then(function(data){
                 $(".btn").html(data.currently.summary);
             });
     }
    function getlocalname(apiLinkTC){
         fetch(apiLinkTC,{'mode': 'no-cors'}).then(function(response){
             if(response.status!==200){
                 console.log('please check.');}else{
                 return response.json();}
                 }).then(function(data){
                     $(".card-title").html(data.result.ad_info.city);
                 });

     }
  });
});

I'm sorry, big guys. I did not respond positively after asking questions. I have been trying to get my app to work, but it until now only the function getweather is working and i think i try it out. I tried to talk about the process of my code, so that when you look at this code easily. The function getUserInfo gets the latitude and longitude. The function getweather gets weather information from latitude and longitude. The function getlocationIP gets the IP address of the requesting device. The function getlocalname returns the IP name of the city by IP as the argument. The following is an error message for the chrome console:

pen.js:5 [Deprecation] getCurrentPosition and watchPosition usage in cross-origin iframes is deprecated and will be disabled in M63, around December 2017. To continue to use this feature, it must be enabled by the embedding document using Feature Policy, e.g. <iframe allow="geolocation" ...>. See https://goo.gl/EuHzyv for more details.
getUserInfo @ pen.js:5
(anonymous) @ pen.js:3
dispatch @ jquery.min.js:3
q.handle @ jquery.min.js:3
console_runner-079c09a0e3b9ff743e39ee2d5637b9216b3545af0de366d4b9aad9dc87e26bfd.js:1 please check.
pen.js:45 Uncaught (in promise) TypeError: Cannot read property 'result' of undefined
at pen.js:45
at <anonymous>
(anonymous) @ pen.js:45
Promise resolved (async)
getlocalname @ pen.js:44
showeather @ pen.js:15
pen.js:19 GET https://codepen.io/boomerang/iFrameKey-220872e6-4a52-69a4-9675-b80209acd298/freegeoip.net/json 404 ()
getlocationIP @ pen.js:19
showeather @ pen.js:13
console_runner-079c09a0e3b9ff743e39ee2d5637b9216b3545af0de366d4b9aad9dc87e26bfd.js:1 please check.
pen.js:24 Uncaught (in promise) TypeError: Cannot read property 'ip' of undefined
at pen.js:24
at <anonymous>

Zhang LIn
@zl-cheetah
Sep 13 2017 07:40
image.png
Blauelf
@Blauelf
Sep 13 2017 07:54
@zl-cheetah Works for me. Have you clicked "Run tests" again? If that doesn't work, maybe reloading the page solves the issue.
Jake
@JakeDVirus
Sep 13 2017 07:56

suppose i have a code like this

function rough1(){
    followingList[i];
   //some other statements
};

function rough2(){
    var followingList =[Array];
   //some other statements
    function rough3(){
          rough1(){};
    }
}

according to name-resolution lookup and execution context, the function rough1 will have access to the variable followingList when called inside the function rough3.
Am i right or wrong?
Actually in my specific piece of code(given below the link) the variable followingList is said to be not defined when called in this manner. check out the line-10 and line-65 here and check the browser console https://codepen.io/neel111/pen/oeKGJL?editors=1011

Blauelf
@Blauelf
Sep 13 2017 07:57
@NeelDVirus It does not matter from which scope a function is called, but in which scope it has been defined.
Those references are resolved on definition, not on call. That way, a function always keeps references to all the scopes outside of its definition scope. Which also means that none of those scopes can be garbage collected as long as the function exists.
Jake
@JakeDVirus
Sep 13 2017 07:59
@Blauelf so do i need to pass followingList as the argument when the function rough1 is called from the scope of rough3?
Blauelf
@Blauelf
Sep 13 2017 08:00
That's one common way, yes. Usage of global variables is rarely the way to go.
Jake
@JakeDVirus
Sep 13 2017 08:02
i am being blunt in your this statement "Usage of global variables is rarely the way to go". i can comprehend with a bit more elaboration
Blauelf
@Blauelf
Sep 13 2017 08:08
If you're referencing a variable from multiple functions, you can define them in a common scope. This could, but rarely should, be the global scope.
Or, if you want to pass varying values, you'd use parameters instead.
Zhang LIn
@zl-cheetah
Sep 13 2017 08:09
@Blauelf thanks for your help
CamperBot
@camperbot
Sep 13 2017 08:09
zl-cheetah sends brownie points to @blauelf :sparkles: :thumbsup: :sparkles:
:star2: 4601 | @blauelf |http://www.freecodecamp.com/blauelf
Blauelf
@Blauelf
Sep 13 2017 08:10
@NeelDVirus An example for a common scope is the "private properties" lesson (which doesn't use properties, as those are never private in JS). There, the common scope is the one the constructor function creates.
Jake
@JakeDVirus
Sep 13 2017 08:12
@Blauelf oh i got it now. thanks for the comprehensive information. helped me lot
CamperBot
@camperbot
Sep 13 2017 08:12
neeldvirus sends brownie points to @blauelf :sparkles: :thumbsup: :sparkles:
:star2: 4602 | @blauelf |http://www.freecodecamp.com/blauelf
Tiago Correia
@tiagocorreiaalmeida
Sep 13 2017 08:42
const s = [5, 7, 2];
// change code below this line

s[0] = 2;
s[1] = 5;
s[2] = 7;
// change code above this line
// Test your code
console.log(s);
Do not replace const keyword.
s is declared with const.
Do not change the original array declaration.
s should be equal to [2, 5, 7].
shouldnt this work?
Marianissimus
@Marianissimus
Sep 13 2017 08:44
well, it does work @tiagocorreiaalmeida
Tiago Correia
@tiagocorreiaalmeida
Sep 13 2017 08:45
probably some beta error then?
Markus Kiili
@Masd925
Sep 13 2017 08:52
@NeelDVirus Another way to say it is that JS has lexical scoping. Where variables can be used is determined from how the functions sit in the code in relation to each other.
Jake
@JakeDVirus
Sep 13 2017 08:55
@Masd925 yeah i got that part. i actually confused the meaning of 'lexical scoping'
Jan Shah
@JanShah
Sep 13 2017 08:56
@NeelDVirus you can imagine your scope as anything between {}
Jake
@JakeDVirus
Sep 13 2017 08:59
@JanShah the domain of scope is beyond {} also i think
Jan Shah
@JanShah
Sep 13 2017 09:02
it's a simplisti way of viewing it
let itemScope = 123
newScope()
function newScope() {
    let itemScope = 'newScope'
    console.log(itemScope)
}
console.log(itemScope)
@NeelDVirus
Tiago Correia
@tiagocorreiaalmeida
Sep 13 2017 09:35
does anyone know any really good js udemy course? I know a bit more than the basics I would say got the frontnend fcc course done aswell but seems im not confident with it yet, and Wanna get better with promises / arrow functions and other es6 changes
Henry
@GitHub-Henry
Sep 13 2017 09:44
@tiagocorreiaalmeida This helped me with JS Promises you might look into Fetch also.
Tiago Correia
@tiagocorreiaalmeida
Sep 13 2017 09:46
thnks @GitHub-Henry
Henry
@GitHub-Henry
Sep 13 2017 09:47
np lots to learn, this place is a good resource for learning
Sandip Shrestha
@saninmersion
Sep 13 2017 09:59
I am trying to display markers and infowindow using gmaps api in codepen and the markers and infowindow do not get displayed. Any one can direct me on why?
https://codepen.io/saninmersion/full/KXKRbz/
Serhii Borovskyi
@serhiicss
Sep 13 2017 10:06
Can anyone explain or point to a video tutorial about LHS and RHS look ups?
Keon Samuel
@keonsam
Sep 13 2017 10:07
LHS or RHS?
Jim Tryon
@jimtryon
Sep 13 2017 10:08
Left hand side or right hand side assignment
Keon Samuel
@keonsam
Sep 13 2017 10:08
@saninmersion is that D3?
Serhii Borovskyi
@serhiicss
Sep 13 2017 10:08
"Left-hand Side" and "Right-hand Side"
Keon Samuel
@keonsam
Sep 13 2017 10:09
example
?
Jim Tryon
@jimtryon
Sep 13 2017 10:09
first video I found on it @serhiicss
hope that is helpful
Sandip Shrestha
@saninmersion
Sep 13 2017 10:09
@keonsam no just google maps api and plain old javascript
Serhii Borovskyi
@serhiicss
Sep 13 2017 10:09
@jimtryon thanks!
CamperBot
@camperbot
Sep 13 2017 10:09
serhiicss sends brownie points to @jimtryon :sparkles: :thumbsup: :sparkles:
:cookie: 454 | @jimtryon |http://www.freecodecamp.com/jimtryon
Dylan Geng
@dylanGeng
Sep 13 2017 10:11
How to print? use console.log()?
Sandip Shrestha
@saninmersion
Sep 13 2017 10:13
@dylanGeng console.log(5 + 6); will give you 11 on the console screen. You can also log objects, variables and values such as strings, numbers directly.
Dylan Geng
@dylanGeng
Sep 13 2017 10:14
image.png
image.png
@saninmersion but I can't print in this page
image.png
@saninmersion I just want to print some string variable to see its value.
Sandip Shrestha
@saninmersion
Sep 13 2017 10:17
@dylanGeng have you checked on the browser console?
Dylan Geng
@dylanGeng
Sep 13 2017 10:19
how to check? I use chrome.
@saninmersion how to check? I use chrome
heroiczero
@heroiczero
Sep 13 2017 10:20
@dylanGeng F12
Sandip Shrestha
@saninmersion
Sep 13 2017 10:20
@dylanGeng press F12 and go to console
@dylanGeng did you find it?
Dylan Geng
@dylanGeng
Sep 13 2017 10:24
@saninmersion I found it, but it is a little complicated
image.png
Sandip Shrestha
@saninmersion
Sep 13 2017 10:25
@dylanGeng run the code
Stephen James
@sjames1958gm
Sep 13 2017 10:27
@dylanGeng the str.replace(/./g, "") removes all characters because . is special in regex
you would need to use \. to prevent this
@dylanGeng That is the reason your console looks all empty because str and resstr are empty strings
Daniel Romero
@Ranacode
Sep 13 2017 10:31
Hey guys
How can I achieve an auto-login after signup on passport js + express
Henry
@GitHub-Henry
Sep 13 2017 11:19
@Ranacode This may help or this.
Daniel Romero
@Ranacode
Sep 13 2017 11:30
Thanks by the way but I already fixed it :)
Dylan Geng
@dylanGeng
Sep 13 2017 11:50
@Ranacode thank you guys
CamperBot
@camperbot
Sep 13 2017 11:50
dylangeng sends brownie points to @ranacode :sparkles: :thumbsup: :sparkles:
:cookie: 349 | @ranacode |http://www.freecodecamp.com/ranacode
Jake
@JakeDVirus
Sep 13 2017 12:13
There is some problem in appending or cloning and i dont know what it is exactly. Below is the piece of code and it doesn't throw any error but i cant see my dom element being appended.
    function helperSuccess(JSONData, username){
        var $cloneDOM, $cloneList = [], logo;
        $cloneDOM = $(".wrapper_streamers-blocks .prototype-block").clone(true, true);    
        $cloneDOM.find(".wrapper-username .username").text(username);
        console.log($cloneDOM);//for debugging purpose
        if (JSONData.stream == null) {           
            logo = "http://www.vistacollege.edu/images/graphics/page-warning.png";
            $cloneDOM.find(".logo img").attr({
                "class" : "cancel-logo",
                src : logo
            });
            $cloneDOM.children(".status").text("Offline");
        } else {            
            logo = JSONData.stream.channel.logo;
            $cloneDOM.find(".logo .img").attr("src", logo);
            $cloneDOM.children(".status").text("Online");
        }
        return $cloneDOM;
    }

    //---stream-Status of fcc---
    var urlStatus ="https://api.twitch.tv/kraken/streams/freecodecamp?client_id=x1u9u2hml989t8tka511umq622j1l0";
    // getJSON-FUNCTION__FIRST-LEVEL
    $.getJSON(urlStatus,function(returnedData){
        var cloneRetrieved = helperSuccess(returnedData, "freecodecamp");
        $(".wrapper_streamers-blocks").append(cloneRetrieved);
    }); // end of getJSON-FUNCTION
Stephen James
@sjames1958gm
Sep 13 2017 12:27
@NeelDVirus When you go to the element inspector you don't seen the elements?
Jake
@JakeDVirus
Sep 13 2017 12:41
@sjames1958gm i see but some unsual stuff. this is what i see
[div.prototype-block.clearfix, prevObject: r.fn.init(1)]
OOps i did some stupid mistake in css. the protype block was set to `display: hidden. its showing the element now being appended
Stephen James
@sjames1958gm
Sep 13 2017 12:59
@NeelDVirus :+1: you cloned a hidden item?
Jake
@JakeDVirus
Sep 13 2017 13:04
@sjames1958gm yeah exactly. Now the element is visible. but i am stuck in one more logic. i am making a automated process of cloning the .prototype element dynamically using for loop and the function mentioned above. i need that original element with class .prototype to be reomoved or hidden. But the problm is that the cloning function is being called in few places. so if i remove the protype element that it will impact the clonning process and if i dont then the protype element will be shown which i dont want. let me see if i get this done or get stuck again
if i get stuck then probably there will be another post from me :D
well thanks btw for assisting. I love this community
Stephen James
@sjames1958gm
Sep 13 2017 13:18
Maybe have a class on the prototype that holds the hidden state - then remove that class after cloning.
Jake
@JakeDVirus
Sep 13 2017 13:28
@sjames1958gm yeah i am trying that itself. the first time i tried removing the class of hidden after clonning but before appending but then the hidden class also got removed from prototype block and it went visible. i am trying now after appending
James Barrett
@jamesbarrett95
Sep 13 2017 13:57
Anyone have experience with using StandardJS?
Jake
@JakeDVirus
Sep 13 2017 14:02
@jamesbarrett95 StandardJS? i heard this term first time
James Barrett
@jamesbarrett95
Sep 13 2017 14:02
@NeelDVirus It's essentially an alternative to ESLint, I quite like it
Jake
@JakeDVirus
Sep 13 2017 14:03
@jamesbarrett95 Oh glad to know this
korzo
@korzo
Sep 13 2017 14:04
@jamesbarrett95 I don't use it, because I don't like some rules and you can't turn them off.
But if you follow all their rules, go for it.
James Barrett
@jamesbarrett95
Sep 13 2017 14:05
@korzo Ah... That's one of the problems I am having
Will White
@willnwhite
Sep 13 2017 14:06
Did StandardJS come before prettier?
James Barrett
@jamesbarrett95
Sep 13 2017 14:06
@korzo I am using StandardJS with VSCode, however it keeps throwing '[functionName] is not defined'. This is a problem because if I am using a library such as Mocha.js and I use their built-in functions, StandardJS doesn't recognise it
I wonder if there's a way you can sync StanardJS up with libraries
korzo
@korzo
Sep 13 2017 14:08
@jamesbarrett95 That was also one of problems I had. But it's not bad because it force you to use dependency injection
@jamesbarrett95 But it sucks in some cases as mocha, for example, where you can't simply inject describe or it
Jake
@JakeDVirus
Sep 13 2017 14:10
console.log(followinglist[i]) in the 3rd line gives the expected result but in the 13th line it gives the output undefined. seems the function of the success method don't have access to the followingList.
how to let the success method have access to the followingList?
            followingList = [Array of usernames]
            for(var i=0; i<=followingList.length; i=i+1){
                console.log(followingList[i])//for debugging purpose
                $.ajax({
                    type: "GET",
                    url: "https://api.twitch.tv/kraken/streams/" + followingList[i],
                    beforeSend: function(xhr){
                        //xhr.setRequestHeader("Accept","application/vnd.twitchtv.v5+json");
                        //to use the above line, we need to use id instead of username
                        xhr.setRequestHeader("Client-ID","x1u9u2hml989t8tka511umq622j1l0");
                    },
                    success: function(returnedData2){                      
                      console.log(followingList[i])//for debugging purpose
                      var cloneRetrived2 = helperSuccess(returnedData2, followingList[i]);                      
                      $(cloneRetrived2).appendTo(".wrapper_streamers-blocks").removeClass("prototype-block");
                    },
                    error: function(){console.log("Request for retrieving content-- failed")}
                });
Blauelf
@Blauelf
Sep 13 2017 14:11
@NeelDVirus It should have access to followingList. But you'd be surprised by the value of i at that point (use let i = 0; instead of var i = 0; to fix that point). Also, your for loop should probably not use <=.
korzo
@korzo
Sep 13 2017 14:11
@jamesbarrett95 /* global describe it */ at the top
Blauelf
@Blauelf
Sep 13 2017 14:13
@NeelDVirus The i within the ajax callback is evaluated on success, when the loop already has finished, and i is at the first value that no longer fulfills the condition.
Jake
@JakeDVirus
Sep 13 2017 14:14
@Blauelf Oops yeah i replace <= with <. this happened by mistake.
btw let is being specified in ES6 i guess
@Blauelf And what's the reason behing the fact that using let will give access to the mentioned array object and using var wont provide the access
Blauelf
@Blauelf
Sep 13 2017 14:17

@NeelDVirus Take for example

for (var i = 1; i < 10; i++) {
  setTimeout(function(){console.log(i);}, i*1000);
}

logs 10 9 times.

for (let i = 1; i < 10; i++) {
  setTimeout(function(){console.log(i);}, i*1000);
}

logs numbers 1..9

for (var i = 1; i < 10; i++) {
  (function(i){
    setTimeout(function(){console.log(i);}, i*1000);
  }(i));
}

does so by creating another scope with an IIFE.

@NeelDVirus The let will create another variable for each iteration. Its scope is the loop body only in this iteration.
Jake
@JakeDVirus
Sep 13 2017 14:20
@Blauelf is it reliable to use let. i mean this is in ES6, isn't it?
@Blauelf using let solved the issue and got it done. But just a curiousity to know. according to lexical scoping followingList should come inside the scope of success. why it dint happned that way in this case?
Moisés Man
@moigithub
Sep 13 2017 14:25
cuz followingList is on parent scope.. it is available on child... the problem is with i variable
and the asynchronous behaviour of ajax (similar to setTimeout .. it will be executed later)
Jake
@JakeDVirus
Sep 13 2017 14:28
@moigithub oh i never went through this so i dont know about the different cases of i variable when used with var and let. can you pass me a link for the comprehensive explanation in this context. it will be much helpfull for me
Moisés Man
@moigithub
Sep 13 2017 14:32
probably checking about "javascript event loop" (google for videos) can help to understand about sync/async thing
James Barrett
@jamesbarrett95
Sep 13 2017 14:38
@jamesbarrett95 /* global describe it */ at the top perfect!! thanks a lot
CamperBot
@camperbot
Sep 13 2017 14:38
sorry jamesbarrett95, you can't send brownie points to yourself! :sparkles: :sparkles:
Jake
@JakeDVirus
Sep 13 2017 14:39
@korzo do that link contain the details of the var and i as depicted in the above discussions
korzo
@korzo
Sep 13 2017 14:41
@NeelDVirus Nope. It's related to scope.
To understand your problem with var, take a look here https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop
or google javascript event loop as @moigithub suggested
Stephen James
@sjames1958gm
Sep 13 2017 14:42
Jake
@JakeDVirus
Sep 13 2017 14:43
This message was deleted
CamperBot
@camperbot
Sep 13 2017 14:43
neeldvirus sends brownie points to @korzo and @blauelf :sparkles: :thumbsup: :sparkles:
:cookie: 480 | @korzo |http://www.freecodecamp.com/korzo
:star2: 4603 | @blauelf |http://www.freecodecamp.com/blauelf
Jake
@JakeDVirus
Sep 13 2017 14:44
@korzo @sjames1958gm oh great thanks a lot. going to check those out
@Blauelf Thanks to you also
CamperBot
@camperbot
Sep 13 2017 14:44
neeldvirus sends brownie points to @korzo and @sjames1958gm and @blauelf :sparkles: :thumbsup: :sparkles:
api offline
api offline
:star2: 8461 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
James Barrett
@jamesbarrett95
Sep 13 2017 14:45
@korzo I am also suffering another error from StanardJS... So I have an expect() function:
    expect(checkForShip(player, [9, 9])).to.be.false
StandardJS linter says: Expected an assignment or function call and instead saw an expression. (no-unused-expressions)
However, there are some expect functions that work fine... Basically if you append () to the end of the line, it prevents the error.
Very strange!
korzo
@korzo
Sep 13 2017 14:50

@jamesbarrett95

    expect(checkForShip(player, [9, 9])).to.be.false()

doesn't work?

James Barrett
@jamesbarrett95
Sep 13 2017 14:51
Unofortunately not, as .to.be.false is not a function
korzo
@korzo
Sep 13 2017 14:51
@jamesbarrett95 It doesn't :(
you need dirty-chai plugin for this
James Barrett
@jamesbarrett95
Sep 13 2017 14:51
dirty chai
lovely name
Alright, I'll check it out
korzo
@korzo
Sep 13 2017 14:52
@jamesbarrett95 As far as I can tell, it's the only way to use StandardJS with chai without errors.
but as I said, I used it only in few projects some time ago
James Barrett
@jamesbarrett95
Sep 13 2017 14:53
Ok cool, I'll let you know how I get on
James Barrett
@jamesbarrett95
Sep 13 2017 14:58
Yep, works wonderfully. Thanks @korzo
CamperBot
@camperbot
Sep 13 2017 14:58
jamesbarrett95 sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 481 | @korzo |http://www.freecodecamp.com/korzo
korzo
@korzo
Sep 13 2017 14:58
@jamesbarrett95 Glad to help
Sandip Shrestha
@saninmersion
Sep 13 2017 15:25
This map I built on google maps api does not work for me in chrome but works in firefox. The markers do not get displayed.
can anybody suggest why?
https://codepen.io/saninmersion/full/KXKRbz/
Christopher McCormack
@cmccormack
Sep 13 2017 15:34
@saninmersion I don't see the markers in firefox either
Sandip Shrestha
@saninmersion
Sep 13 2017 15:35
@cmccormack my problem was that my adblocker was blocking the markers from getting displayed. You have any turned on?
Christopher McCormack
@cmccormack
Sep 13 2017 15:35
@saninmersion yup :) glad you figured it out
Sandip Shrestha
@saninmersion
Sep 13 2017 15:36
@cmccormack someone else did actually ;D
Diego Mayer
@Chrono79
Sep 13 2017 15:49
@saninmersion try giving more contrast to that map (there should be an option out there to paint the sea blue), I almost got blind ;)
Weird enough, it doesn't load the markers when in full screen, when I change to editor and change it back to full screen, they show up
Jan Shah
@JanShah
Sep 13 2017 15:50

can anyone help with this ?
https://codepen.io/centropy/pen/gGOZgB

the dots behind the globe appear as if in the front, I can't see a clear way of hiding them from view

Kelechi Chinaka
@ke1echi
Sep 13 2017 15:53
:wave: @Chrono79
Diego Mayer
@Chrono79
Sep 13 2017 15:53
:wave:
Kelechi Chinaka
@ke1echi
Sep 13 2017 15:54
how are the codes falling @Chrono79
Diego Mayer
@Chrono79
Sep 13 2017 15:57
Falling or failing? ;)
Kelechi Chinaka
@ke1echi
Sep 13 2017 15:57
:smile: both
Diego Mayer
@Chrono79
Sep 13 2017 15:58
a little this, a little that then
failure is the path to success (or at least I hope it is)
Kelechi Chinaka
@ke1echi
Sep 13 2017 15:59
i hope too..lol
Marco Galizzi
@Tezenn
Sep 13 2017 16:06
hello everyone, im my js calculator i found a bug. if i put 0022 and press = it give me 18 :D
Diego Mayer
@Chrono79
Sep 13 2017 16:07
@Tezenn you shouldn't allow to put more than one 0 and that is if you press . after it
Marco Galizzi
@Tezenn
Sep 13 2017 16:08
true i will try thanks @Chrono79
CamperBot
@camperbot
Sep 13 2017 16:08
tezenn sends brownie points to @chrono79 :sparkles: :thumbsup: :sparkles:
:star2: 4539 | @chrono79 |http://www.freecodecamp.com/chrono79
Diego Mayer
@Chrono79
Sep 13 2017 16:09
:wave: later
Christopher McCormack
@cmccormack
Sep 13 2017 16:09
@JanShah It looks like the circles that you want displayed are between a certain cx, maybe hide or don't even draw a circle if they are outside the visible cx coords
edit: looks like it just wraps back around so that might not work...
Christopher McCormack
@cmccormack
Sep 13 2017 16:15
@JanShah you're doing a lot of extra work every time you click - instead of running project, you can assign your paths and circles to a variable the first time you run your project function then in your click handler just update the positions by running them through your projection
Jan Shah
@JanShah
Sep 13 2017 16:18
@cmccormack I'm not sure what you mean
on rotation if I don't redraw everything, it draws over the previous svg.
I pick up the data before handling drawing so only one request is made to the api, the rest is jut calculations for position
Christopher McCormack
@cmccormack
Sep 13 2017 16:23
@JanShah I'm looking through yours and there's quite a bit to unpack, but you shouldn't need to do all the work over again. Check out mine and look at the resize function, you should only need to update the necessary path and circle data when you click, not redo the entire thing - https://codepen.io/cmccormack/pen/QMeXvo
Jan Shah
@JanShah
Sep 13 2017 16:24
@cmccormack yours is nice :)
Christopher McCormack
@cmccormack
Sep 13 2017 16:25
Thanks, it's not trying to do as much as yours though! I'm trying to edit a fork of yours and I can't even get it to rotate now :D
Jason Luboff
@JLuboff
Sep 13 2017 16:59
:zzz:
imperial-isms
@imperial-isms
Sep 13 2017 17:05
Hey all
Got a little code review for Wikipedia Viewer...
 var wikiResultsArray = []; //couldn't figure out how to assign JSON results to this array

    $.getJSON ("https://en.wikipedia.org/w/api.php?action=query&format=json&prop=&list=search&srsearch=" + searchQuery + "&callback=?", function (json) { 
      breakOutJSON(json.query.search);
    });

      function breakOutJSON(results) {

        ///iterate through results        
        results.forEach (function (element) {
          var resultItem = "<li>" + element.title + ": " + element.snippet + "</li>"; 
          $("#search-results").append(resultItem);
                         });
      };
I was trying to seperate my functions, but I couldn’t assign the results to variable wikiResultsArray…is there a better way?
Gersho
@Gersho
Sep 13 2017 17:11
JSON result is more like an object than an array
Christopher McCormack
@cmccormack
Sep 13 2017 17:12
@imperial-isms where are you assigning it?
imperial-isms
@imperial-isms
Sep 13 2017 17:13
I’ve already figured out what items I needed in the object, hence json.query.search
Christopher McCormack
@cmccormack
Sep 13 2017 17:14
@imperial-isms what exactly is the issue? Are you wanting to store the results in that array and use it somewhere else in your code you aren't showing?
imperial-isms
@imperial-isms
Sep 13 2017 17:15
I’m accessing json.query.search with the breakOutJSON function, and iterating through theresults parameter.
Christopher McCormack
@cmccormack
Sep 13 2017 17:15

@imperial-isms

I was trying to seperate my functions, but I couldn’t assign the results to variable wikiResultsArray…is there a better way?

imperial-isms
@imperial-isms
Sep 13 2017 17:16
Yes, I initially was trying to assign the json object to that variable (wikiResultsArray), but I couldn’t figure out how to work with the async nature of .getJSON
Ideally wikiResultsArray = json.query.searchso that it can be accessed outside the scope of .getJSON
var results = {};

$.getJSON (“source”, function (json) {
//somehow assign json  to the results variable
});

//...so that results is accessible here
I came across a bunch of links of people trying to do this but I wasn’t able to draw a working solution
Gersho
@Gersho
Sep 13 2017 17:23
getJSON being asynchronous, be carefull when trying to do out of scope stuff
imperial-isms
@imperial-isms
Sep 13 2017 17:24
That's the issue I'm trying to get around
Gersho
@Gersho
Sep 13 2017 17:24
i'm saying you shouldn't be trying to get around it
what's wrong with having your code in the callback ?
imperial-isms
@imperial-isms
Sep 13 2017 17:25
That's the other point I'm pondering. I understand that simplyiny functions is best practice.
*simplifying
Does having my various functions that ultimately lead up to displaying search results to the page make for good etiquette?
Good = readable and comprehendable
Gersho
@Gersho
Sep 13 2017 17:27
i don't know about etiquette
Christopher McCormack
@cmccormack
Sep 13 2017 17:28
@imperial-isms you aren't going to get around the async nature unless you make it sync, which you don't really want to do. Instead, keep using your callbacks, or use promises. You can still assign the data to the array, but only use that array after you know the ajax call has responded. For example, maybe you have a click event that uses that array, maybe for sorting. That event will wait for user input, but that may be well after the async call gets back. You can even disable the click event until the async call is completed
Gersho
@Gersho
Sep 13 2017 17:28
and good doesn't mean the same thing for everyone, some like human readable stuff, others see "elegance" as an important point, etc...
having almost all your code in your callback isn't as bad as you seem to think it it, after all, isn't all your code already in a (document).ready callback ?
imperial-isms
@imperial-isms
Sep 13 2017 17:31
Fair enough
Abhinav Mishra
@abhinav-m
Sep 13 2017 17:31
codepen down?
imperial-isms
@imperial-isms
Sep 13 2017 17:31
Just trying to assume best practices for old habits stick to well
Gersho
@Gersho
Sep 13 2017 17:33
@abhinav-thinktank codepen working for me
don't know about practices sorry ^^ like a lot of people on this room i learned from stuff on the internet
but if you're interested in them, you could try codewars, everytime you finish a challenge there, you get to a page where it shows you how others did it and users can vote for style/clever
Pethaf
@Pethaf
Sep 13 2017 17:39
Here is a question.
What is the plural form of mongoose?
Christopher McCormack
@cmccormack
Sep 13 2017 17:44
Mongeese of course
Jason Luboff
@JLuboff
Sep 13 2017 17:56
plural form is vanilla mongodb :P
Markus Kiili
@Masd925
Sep 13 2017 17:58
Is noSQL really the faucet and the mongoose of database programming?
Jason Luboff
@JLuboff
Sep 13 2017 18:01
...maybe...?
:D
All I know is mongo is much much much easier to use, manipulate, etc, then say MS Sql when it comes to using it with Node
Markus Kiili
@Masd925
Sep 13 2017 18:14
@JLuboff They both suit very different things. Relational databases start to have benefits when you need to process the data in different ways. If you just store, find and retrieve data, there is no need for relational theory.
Jason Luboff
@JLuboff
Sep 13 2017 18:18
@Masd925 Correct. I'm just saying with nodejs, that mongo is very easy to work with. When it comes to MS Sql, its much more difficult to create dynamic queries with nodejs, you're better off either having pre-defined queries or stored procedures
korzo
@korzo
Sep 13 2017 18:22
@JLuboff It's difficult to create dynamic queries with SQL ?
Jason Luboff
@JLuboff
Sep 13 2017 18:23
I personally think so, but thats just my experience
korzo
@korzo
Sep 13 2017 18:30
@JLuboff From SQL nature, all queries are dynamic.
I think SQL is very easy in Node.js as long as you know SQL
connection.query('SELECT something FROM sometable', function (error, results, fields) {})
Jason Luboff
@JLuboff
Sep 13 2017 18:33
@korzo Thats an extremely basic query though. So what about where you need to specify fields based on user input and you need to access from multiple tables such as this query
SELECT ITEM_NUM, NUM_ORDERED, ORDERS.ORDER_NUM, ORDER_DATE, CUSTOMER.CUSTOMER_NUM, CUSTOMER_NAME, REP.REP_NUM, LAST_NAME
FROM ORDER_LINE, ORDERS, CUSTOMER, REP
WHERE ORDER_LINE.ORDER_NUM = ORDERS.ORDER_NUM
AND ORDERS.CUSTOMER_NUM = CUSTOMER.CUSTOMER_NUM
AND CUSTOMER.REP_NUM = REP.REP_NUM
ORDER BY ITEM_NUM, ORDER_LINE.ORDER_NUM;
Markus Kiili
@Masd925
Sep 13 2017 18:34
@JLuboff Sure it is easier, but the choice will depend on how the data needs to be used. If you have massive amounts of complex data and you need to use it in different ways in the future with different applications, then mongo would be a nightmare.
korzo
@korzo
Sep 13 2017 18:36
@JLuboff It's not a problem, because you can join tables and return it in 1 query
Can you do it in mongo in 1 query if data are in different collections?
Jason Luboff
@JLuboff
Sep 13 2017 18:38
@korzo While I have not needed to do so, apparently, yes you can https://docs.mongodb.com/manual/reference/operator/aggregation/lookup/
@Masd925 I understand, there is a reason that there are so many different database systems available. It all depends on your required infastructure
max#237
@maximilientoumi
Sep 13 2017 18:42
please how to make my iframe to be scrolled by the main page
korzo
@korzo
Sep 13 2017 18:45
@JLuboff Well, It's new in 3.2 and it's already some time I last tried MongoDB :)
I plan to give MongoDB another look in next FCC project
@maximilientoumi Well,it's difficult, because iframe scroll only if it has focus.
you can set focus on iframe using javascript
Jason Luboff
@JLuboff
Sep 13 2017 18:48
@korzo :D as I said, I really like mongo for use with nodejs (I took the Mongo university M101JS class too which I learned a lot from). I am also learning MS SQL for work, but I would say I'm more versed in Mongo currently. So not trying to hate on MS SQL, but perhaps I've just not worked with it enough to fully compare the two either
korzo
@korzo
Sep 13 2017 18:59
@JLuboff I'm more fluent in SQL. I tried several NoSQL databases, but I never found user case to use one in real project. But I usually work on projects with a lot of interconnected tables. I made 1 project with Firebase, but it's really very limited and I think it's not comparable to MongoDB. What I like on SQL is possibility to use SQLite without need to install server.
But maybe I'm locked up in SQL mindset, That's why I plan to build next project in both MongoDB and SQL
Jason Luboff
@JLuboff
Sep 13 2017 19:01
Ya I think its understandable for you to have your preference
Adel
@AdelMahjoub
Sep 13 2017 21:23
this is quite :dizzy: but we can use NoSQl with MySQl
Simon Cordova
@gbsimon87
Sep 13 2017 22:07
good eve!
Jason Luboff
@JLuboff
Sep 13 2017 22:07
Afternoon
Simon Cordova
@gbsimon87
Sep 13 2017 22:09
West coast lad obviously
Jason Luboff
@JLuboff
Sep 13 2017 22:09
...perhaps...
Gersho
@Gersho
Sep 13 2017 22:12
he could be on easter island :P
Simon Cordova
@gbsimon87
Sep 13 2017 22:14
that's west coast for me!
$500 on California lol
Jason Luboff
@JLuboff
Sep 13 2017 22:16
...do I get that $500?
Simon Cordova
@gbsimon87
Sep 13 2017 22:16
Depends on the currency
for ( var i= 500; i > -20; i++) {
console.log("You've won $500!");
}
try that in the console ;)
Jason Luboff
@JLuboff
Sep 13 2017 22:18
Not going to fall for that!
Gersho
@Gersho
Sep 13 2017 22:18
how about rm-rf / ? would you fall for it
Simon Cordova
@gbsimon87
Sep 13 2017 22:19
who needs a file system?
Jason Luboff
@JLuboff
Sep 13 2017 22:19
Nope
Simon Cordova
@gbsimon87
Sep 13 2017 22:19
On a serious note, any of you guys dabble with react or angular?
trying to choose which framework to dive into first
Gersho
@Gersho
Sep 13 2017 22:20
only started react recently sorry ^ ^
toss a coin, anybody trying to predict trend is doing the same anyway
or try first few lessons of both, and take the one that feels cooler
Jason Luboff
@JLuboff
Sep 13 2017 22:21
@gbsimon87 In the backend room @AdelMahjoub Is talking to me all about that stuff. Seems that react is a good way to go though
Simon Cordova
@gbsimon87
Sep 13 2017 22:52
cheers @JLuboff goodnight all
BrianWilliams28
@BrianWilliams28
Sep 13 2017 23:08
is there a way to check with regular expressions exactly how many matches occured with your search?
Jason Luboff
@JLuboff
Sep 13 2017 23:10
I believe .match returns an array that contains that
BrianWilliams28
@BrianWilliams28
Sep 13 2017 23:11
yeah i just figred that out lol