These are chat archives for FreeCodeCamp/HelpJavaScript

22nd
Aug 2017
Stuhl
@Stuhl
Aug 22 2017 00:17 UTC
Hey guys, could someone explain me what this piece of code does exactly ?
this.events[eventName] = this.events[eventName] || [];
Manish Giri
@Manish-Giri
Aug 22 2017 00:18 UTC
@Stuhl it's like saying name = name || ''
if the name variable exists, and is not undefined, use that value for name
however, if it is undefined, use an empty string as the value for name instead
Stuhl
@Stuhl
Aug 22 2017 00:25 UTC

@Manish-Giri Thanks good to know though I dont understand it in this context and how the array is placed inside the object:

let eventSystem = {
  events: {},
  on: function(eventName, fn) {
    this.events[eventName] = this.events[eventName] || [];
    this.events[eventName].push(fn);
  }
}

Basically thats the pub/sub pattern but I can't get my head around it to understand it fully, I only see the result in the console

CamperBot
@camperbot
Aug 22 2017 00:25 UTC
stuhl sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 6448 | @manish-giri |http://www.freecodecamp.com/manish-giri
aRtoo
@artoodeeto
Aug 22 2017 00:33 UTC
for this problem do you really need recursion?

function steamrollArray(arr) {
  // I'm a steamroller, baby
  return arr;
}

steamrollArray([1, [2], [3, [[4]]]]);
Nick Forlivio
@whackdev
Aug 22 2017 00:40 UTC
has anyone completed the voting app project?
Greg Duncan
@GregatGit
Aug 22 2017 00:46 UTC
@Stuhl a small thing but you should be using const there - not let
Stuhl
@Stuhl
Aug 22 2017 00:48 UTC
I always declare objects with let, never changed them yet, are they even changeable ? Thought they would only reference
Greg Duncan
@GregatGit
Aug 22 2017 01:10 UTC
@Stuhl objects are always const (and arrays) - you might change what is inside them but they are constantly pointing to the same place
@Stuhl if you were going to change the object to string or a number - then you would use let - but in your example above const would be the correct choice
Greg Duncan
@GregatGit
Aug 22 2017 01:18 UTC
@Stuhl in your eventSystem a great way to set a property value is using the the || - so if there is nothing there instead of it being null or undefined you can set it to what ever you want
let greeting = english.greet || 'hello'
// if english.greet hasn't been set it will be hello
Stuhl
@Stuhl
Aug 22 2017 01:34 UTC
@GregatGit Actually they are not, objects and array (and all others data types) were created with var before
It just got more and more usual cuz of ES6 to write them with const and let though I dont find const to be needed here tbh, I never change objects anyways, just the inner keys
But will consider to write with const more, it looks cooler too lol
Aaron Bell
@awb715
Aug 22 2017 01:46 UTC
i need to compare a piece of info froma form with a object
if i do objectname.input it doesnt return the right value, do i need to convert the value to string ?
Gulsvi
@gulsvi
Aug 22 2017 01:52 UTC
@awb715 yeah, you can't compare objects the same as strings, if I understand what you're trying to do:
var myObj1 = {
  foo: "bar"
};

var myObj2 = {
  foo: "bar"
};

console.log(myObj1 == myObj2) // false
Aaron Bell
@awb715
Aug 22 2017 01:52 UTC
figured it out
difference was doing object.name vs object[name]
Gulsvi
@gulsvi
Aug 22 2017 01:54 UTC
var myObj1 = {
  foo: "bar"
};

var myObj2 = {
  foo: "bar"
};

console.log(myObj1.foo == myObj2["foo"]) // true
console.log(myObj1.foo == myObj2[foo]) // false
Morchid Chellali
@Morched23MJ
Aug 22 2017 02:11 UTC
How to reset my code, when everytime I enter the page of that challenge, it freezes, because the code cause an infinite recusion call?
Ah, I fixed it. Had to clear browser data.
Bradley Sands
@sandsbe
Aug 22 2017 02:14 UTC
That is a huge bummer. In the fCC playground?
Morchid Chellali
@Morched23MJ
Aug 22 2017 02:15 UTC
Yes, but I fixed it.
Bradley Sands
@sandsbe
Aug 22 2017 02:20 UTC
Nice. That problem definitely has a Q/A in the forum. Not sure if you've used that to search for issues before.
Why aren't my links going to their channels twitch pages like they should
Morchid Chellali
@Morched23MJ
Aug 22 2017 02:27 UTC
Probably, because there is an underscore '_' before links when you appended then to .dynamic?
korzo
@korzo
Aug 22 2017 02:27 UTC
@taiJones00 getJSON is async function
Tai Jones
@taiJones00
Aug 22 2017 02:28 UTC
I don't understand
Because I'm using get JSON I can't link?
korzo
@korzo
Aug 22 2017 02:28 UTC
@taiJones00 At the moment its called, i === listOfUsers.length
@taiJones00 replace var with let in for loop
Tai Jones
@taiJones00
Aug 22 2017 02:29 UTC
Let in?
korzo
@korzo
Aug 22 2017 02:29 UTC
@taiJones00 for (let i = 0; i < listOfUsers.length; i++)
Tai Jones
@taiJones00
Aug 22 2017 02:29 UTC
Okay so why does this way allow linking to work
Whoa cool it works but why
korzo
@korzo
Aug 22 2017 02:31 UTC
@taiJones00 because let is bind to block scope
var is not
Tai Jones
@taiJones00
Aug 22 2017 02:32 UTC
Here I'll look it up because I'm not sure what block scope is. I should just look up block scope and let loop?
Ginger
@GingerChew
Aug 22 2017 02:32 UTC
Hey guys, am I getting the recursion right in this function?
function steamrollArray(arr) {
  // I'm a steamroller, baby
  var arrFlat=[],i=1;
  function arrayQuestion(arr) {
    for (i;i>arr.length;i++) {
      if (arrFlat[0].isArray) {
        arrayQuestion(arr[i]);
      } else {
        arrFlat.concat.apply([],arr[i]);
      }
    }
  }
  arrayQuestion(arr);
  return arrFlat;
}
@GingerChew No. you can make it more simple by calling steamrollArray recursively
Bradley Sands
@sandsbe
Aug 22 2017 02:44 UTC
@taiJones00 had similar issue. You'll see let and const are most typically used as you advanced for scoping purposes. Check out the Airbnb JS style guide and the Google JS style guide.
Bradley Sands
@sandsbe
Aug 22 2017 02:55 UTC
<div class="checkbox">
    <label>
    <input type="checkbox" checked='check' value='' id='strict'>
    Strict Mode
  </label>
  </div>
What's the best way to play with a checkbox? From research, the value is basically useless. Do I really need to continually check the .attr in order to get a yes/no?
korzo
@korzo
Aug 22 2017 02:59 UTC
@sandsbe value is not useless. It's what is send to server in post/get request.
also you should use prop instead of attr for this case
Bradley Sands
@sandsbe
Aug 22 2017 03:00 UTC
@korzo read my mind. I almost even caveatted my statement with the server info.
 $('#strict').click(function(){
    if ($('#strict').prop('checked',false)) {
      $('#strict').prop('checked',true);
    } else {
      $('#strict').prop('checked',false)
    }
  })
This doesn't allow for the uncheck.
korzo
@korzo
Aug 22 2017 03:02 UTC
@sandsbe
 $('#strict').click(function(){
    if (!$('#strict').prop('checked')) {
      $('#strict').prop('checked',true);
    } else {
      $('#strict').prop('checked',false)
    }
  })
Bradley Sands
@sandsbe
Aug 22 2017 03:04 UTC
Just tried something similar, didn't work. I'll try that now.
$('#strict').click(function(){
    if (!$('#strict').is(':checked')) {
      $('#strict').prop('checked',true);
    } else {
      $('#strict').prop('checked',false);
    }
  })
So, that doesn't work without the : before checked, but then it won't let me uncheck.
$('#strict').click(function(){
    if (!$('#strict').prop(':checked')) {
      $('#strict').prop('checked',true);
    } else if ($('#strict').prop(':checked')) {
      $('#strict').prop('checked',false);
    }
  })
Only put in the full else if to check to see if there was anything weird happening.
@sandsbe You can't listen for click on checkbox, otherwise you are reverting click immediately
slimbloody
@slimbloody
Aug 22 2017 03:17 UTC
Can someone help me solve the "Generate Random Fractions with JavaScript" problem?return Math.random(); the code doesn't work
Bradley Sands
@sandsbe
Aug 22 2017 03:18 UTC
@korzo that is a lot of work. Thank you.
CamperBot
@camperbot
Aug 22 2017 03:18 UTC
sandsbe sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 401 | @korzo |http://www.freecodecamp.com/korzo
Bradley Sands
@sandsbe
Aug 22 2017 03:20 UTC
(function(e){ e.preventDefault(); what is this?
korzo
@korzo
Aug 22 2017 03:20 UTC
@slimbloody It's correct
@slimbloody Try to refresh page
Bradley Sands
@sandsbe
Aug 22 2017 03:21 UTC
Ha. The example used in devdocs is the Checkbox: http://devdocs.io/dom/event/preventdefault
slimbloody
@slimbloody
Aug 22 2017 03:21 UTC
@korzo it works! thx!
CamperBot
@camperbot
Aug 22 2017 03:21 UTC
slimbloody sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 402 | @korzo |http://www.freecodecamp.com/korzo
Guderian Raborg
@hypercuber
Aug 22 2017 03:22 UTC
I want to turn an array counter clockwise. What is wrong with my code:
function cc(arr) {
  let newArr = [];
  for (let j = 0; j < arr.length; j++) {
    newArr[j] = [];
    for (let i = 0; i < arr[j].length; i++) {
      newArr[j][i] = arr[i][arr.length - 1 - j];
    }
  arr = newArr;
  }
}

let arr = [[0,1,2], [3,4,5], [6,7,8]];
cc(arr);
console.log(arr);
Why did they do this???
Long Nguyen
@longnt80
Aug 22 2017 03:24 UTC
@hypercuber what does a counter clockwise turned array look like?
Guderian Raborg
@hypercuber
Aug 22 2017 03:25 UTC
[[2,5,8], [1,4,7], [0,3,6]]
Greg Duncan
@GregatGit
Aug 22 2017 03:34 UTC
@hypercuber you don't return anything
korzo
@korzo
Aug 22 2017 03:36 UTC
@sandsbe It was directed to me?
Bradley Sands
@sandsbe
Aug 22 2017 03:41 UTC
If you created JS, yes.
Otherwise, to the coding gods. Or MDN.
Tai Jones
@taiJones00
Aug 22 2017 03:46 UTC
I haven't used any object oriented programming from the beginning to twitch project. Is it really necessary
Long Nguyen
@longnt80
Aug 22 2017 03:47 UTC
@taiJones00 no
Tai Jones
@taiJones00
Aug 22 2017 03:48 UTC
Sweet
Gulsvi
@gulsvi
Aug 22 2017 03:54 UTC
@hypercuber You just need to return the manipulated array, works great
function cc(arr) {
  let newArr = [];
  for (let j = 0; j < arr.length; j++) {
    newArr[j] = [];
    for (let i = 0; i < arr[j].length; i++) {
      newArr[j][i] = arr[i][arr[i].length - 1 - j];
    }
  }
  return newArr;
}

let arr = [[0, 1, 2], [3, 4, 5], [6, 7, 8]];
console.log(cc(arr));
Bradley Sands
@sandsbe
Aug 22 2017 03:56 UTC
@korzo thanks for your help tonight. Never would have figured out this checkbox. Note to self: never use a f^&@*#($ checkbox.
CamperBot
@camperbot
Aug 22 2017 03:56 UTC
sandsbe sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:warning: sandsbe already gave korzo points
korzo
@korzo
Aug 22 2017 03:58 UTC
@sandsbe Glad to help. Checkbox is tricky also server-side, as if not checked, it's missing in request
Tai Jones
@taiJones00
Aug 22 2017 04:00 UTC
Oo someone's feisty tonight
korzo
@korzo
Aug 22 2017 04:08 UTC
@GingerChew I was wrong. There is a way to solve steamrollArray without recursion using arr.splice
Markus Kiili
@Masd925
Aug 22 2017 05:13 UTC
@korzo You can also solve it (non-recursively) by concating the elements as long as there are elements that are arrays there. You can do the check for example with .some().
Ayush Bahuguna
@relentless-coder
Aug 22 2017 05:20 UTC
Can someone explain how 440.00 + 1000 = 440.001000 ?
I can't debug this. This is a node application that makes use of user input, and somehow the debugger doesn't respond after first input
let p,n,r,t;

function prompt(question, callback) {
    var stdin = process.stdin,
        stdout = process.stdout;

    stdin.resume();
    stdout.write(question);

    stdin.once('data', function (data) {
        callback(data.toString().trim());
    });
}

prompt('What is th principal sum?', function(input){
    p = parseFloat(input);
prompt('What is the interest rate?', function(input){
    r = parseFloat(input);
prompt('What is the number of years money is borrowed for?', function(input){
    t = parseFloat(input);
let interest = (p*Math.pow((1 + (r/100)), (t)) - p).toFixed(2)

console.log('interest is ', interest)
console.log('principal is ', p);

let corpus = interest + p;

process.stdout.write(`The compound interest for ${t} years is ${interest} and total corpus is equal to ${corpus}`)
process.exit()
})

})

})
this is the program
Maks Ushakov
@maks-ushakov
Aug 22 2017 05:37 UTC
@relentless-coder toFixed() returns a string.
check it with "typeof"
Ayush Bahuguna
@relentless-coder
Aug 22 2017 06:01 UTC
@maks-ushakov Hey, thanks, I figured that out.
CamperBot
@camperbot
Aug 22 2017 06:01 UTC
relentless-coder sends brownie points to @maks-ushakov :sparkles: :thumbsup: :sparkles:
:cookie: 372 | @maks-ushakov |http://www.freecodecamp.com/maks-ushakov
Conor Murphy
@cmurphy580
Aug 22 2017 06:30 UTC
i'm running an my html on an iphone simulator. I can't get any of the click event listeners to work. I tried touchstart but no luck. Does anyone have any ideas on how to fix this problem?
Greg Duncan
@GregatGit
Aug 22 2017 07:08 UTC
@relentless-coder computers don't do very well with decimals best to use integers where you can or round()
Blauelf
@Blauelf
Aug 22 2017 07:20 UTC
@cmurphy580 Are you sure you have attached the listener correctly? For example, jQuery when attaching same listener to different events at same time, requires them to be separated with spaces, like $('.redbutton').on('click touchstart', clickHandler); (have seen handlers attached to the "click," and "click,touchstart" events by accident)
Conor Murphy
@cmurphy580
Aug 22 2017 07:28 UTC
@Blauelf I'm not sure this how it in my file
$(function() {
  pageSlider();
});

function pageSlider() {
  $(".arrow-right").on('touchstart click', function() {
    $(".slider-page").css("left", "-100%");
    $(".write-container").show();
  });
}
  $(".return-arrow").on('touchstart click', function() {
    $(".slider-page").css("left", "0%");
    $(".write-container").hide(1000); 
});
Blauelf
@Blauelf
Aug 22 2017 07:33 UTC
Looks about right. The .arrow-right and .return-arrow classes are used at document ready?
Does it work with regular click events?
Conor Murphy
@cmurphy580
Aug 22 2017 07:36 UTC
yes they are attached to the document. i have not tried with regular click events. I've tried to include mobilejQuery but nothing seems to work on this
Blauelf
@Blauelf
Aug 22 2017 08:06 UTC
Does the page work if you use a desktop browser? A desktop browser using mobile emulation?
Conor Murphy
@cmurphy580
Aug 22 2017 08:12 UTC
yah @Blauelf i'm trying to get it to work on an iphone 7 simulator using safari
Blauelf
@Blauelf
Aug 22 2017 08:15 UTC

Oh. Safari is the browser we cannot test, as we don't have Apple computers, and for debugging Apple mobile devices, you need an Apple computer. So we just get strange error reports we cannot replicate on our Apple mobile devices and won't know anything.

Is your "iPhone 7 simulator" a PC product? Are other websites reacting to events in the simulator?

Conor Murphy
@cmurphy580
Aug 22 2017 08:18 UTC
@Blauelf should have checked this earlier its not working on safari mobile or safari on my computer(mac) and doesn't work on any mobile browsers
simulator is from xCode
Conor Murphy
@cmurphy580
Aug 22 2017 08:26 UTC
@Blauelf i'll to figure how to make the code compatible. Thanks for the help
CamperBot
@camperbot
Aug 22 2017 08:26 UTC
cmurphy580 sends brownie points to @blauelf :sparkles: :thumbsup: :sparkles:
:star2: 4576 | @blauelf |http://www.freecodecamp.com/blauelf
Blauelf
@Blauelf
Aug 22 2017 08:27 UTC
Wish I could help. To me Safari is almost as exotic as Internet Explorer. Or even more. Internet Explorer 8 (latest on XP?) is still a browser to consider. IE6 (latest on Win2k?), we don't want.
Chris Juchtmans
@kjuchtmans
Aug 22 2017 08:41 UTC
morning all coders! :wave:
Blauelf
@Blauelf
Aug 22 2017 08:41 UTC
Good morning @kjuchtmans
Chris Juchtmans
@kjuchtmans
Aug 22 2017 08:43 UTC
@Blauelf ich haette noch eine Frage in Beziehung "No Repeats Please" / Permutations Loesung...
Blauelf
@Blauelf
Aug 22 2017 08:44 UTC
I haven't done Heap's Algorithm myself. It looks like magic to me.
Markus Kiili
@Masd925
Aug 22 2017 08:45 UTC
@kjuchtmans Most people google some algorithm for making permutations and then implement it with JS.
Die meisten Leute suchen nach einem fertigen Algorithmus, um Permutationen zu machen
Chris Juchtmans
@kjuchtmans
Aug 22 2017 08:51 UTC

@Masd925 I get that; I even get my head around Heaps algorithm, or partially...
What I don't get is how to generate permutations using a recursive function including str.substring( ) -- like this anonymous coder does: FCC profile link

Solution is as simple and concise as it is hard to get for me.
Code :

function permAlone(str,lc) {
  if (str.length===0)
    return 1;
  var res=0;
  for (var i=0; i<str.length; i++)
    if (str[i]!==lc)
      res+=permAlone(str.substring(0,i)+str.substring(i+1),str[i]);
  return res;
}

permAlone('aab');

Who can explain the recursion in plain English to me?
Thanks, I've been torturing my brain on this for days...

CamperBot
@camperbot
Aug 22 2017 08:51 UTC
kjuchtmans sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles:
:star2: 4427 | @masd925 |http://www.freecodecamp.com/masd925
Blauelf
@Blauelf
Aug 22 2017 08:52 UTC

@kjuchtmans Mein Algorithmus versucht gar nicht erst, alle Permutationen zu erzeugen, sondern versucht rekursiv einen gültigen String zusammenzubauen. Dabei ist die Zahl der möglichen Kombinationen die Summe der Rückgabewerte der rekursiven Aufrufe. Dafür übergebe ich den zuletzt benutzten Buchstaben (der für den nächsten Buchstaben verboten ist) und die restlichen Buchstaben.

Viele Leute benutzen allerdings Heap's Algorithmus, und sortieren dann erst die fertigen Strings aus, z.B. per regulärem Ausdruck.

@kjuchtmans "lc" steht für "last-used character"
Chris Juchtmans
@kjuchtmans
Aug 22 2017 08:54 UTC
@Blauelf Genau! I was trying to come up with a sensible meaning of lc, dass wuerde denn 'Last Character' sein, nicht?
Markus Kiili
@Masd925
Aug 22 2017 08:54 UTC
@kjuchtmans Function code can include calls to functions. In the case of recursion, the call happens to be to the same function. Each call makes a new execution context where the function code is run and variables and parameters exist.
Morchid Chellali
@Morched23MJ
Aug 22 2017 08:55 UTC
Anyone here uses Sass as a preprocessor for CSS?
Having a mini issue..
Markus Kiili
@Masd925
Aug 22 2017 08:56 UTC
@kjuchtmans Do you have problems understanding recursion is general, or just in this case?
Blauelf
@Blauelf
Aug 22 2017 08:56 UTC
@kjuchtmans Yeah, last character I used, the one that may not be used next turn. I don't keep track of the used characters, just the last used one and the remaining characters.
Chris Juchtmans
@kjuchtmans
Aug 22 2017 08:58 UTC
@Masd925 recursion still has secrets to me, but I'm slowly getting there. Also, reading left and right that it's less error-prone, speedy and more frugal, in general terms.
Blauelf
@Blauelf
Aug 22 2017 09:00 UTC
@kjuchtmans It's returning the sum of the return values of the recursive calls.
permAlone('aab')
  permAlone('ab', 'a')
    permAlone('a', 'b')
      permAlone('', 'a')
      =>1
    =>1
  =>1
  permAlone('ab', 'a') using other 'a'
    permAlone('a', 'b')
      permAlone('', 'a')
      =>1
    =>1
  =>1
  permAlone('aa', 'b')
    permAlone('a', 'a')
    =>0
  =>0
=>2
Markus Kiili
@Masd925
Aug 22 2017 09:00 UTC
@kjuchtmans For understanding how recursion works, I would suggest looking at some simpler example and figuring out how the function calls are made and evaluated (use paper perhaps):
function reverseString(str) {
  if (str.length===0) return "";
  return reverseString(str.substring(1)) + str.charAt(0);
}
reverseString("catpants"); // 'stnaptac'
Chris Juchtmans
@kjuchtmans
Aug 22 2017 09:01 UTC

@Blauelf It's a thoroughly beautiful solution, one I read only in a small number of posts, StackOverflow e.g. - using Java.

nice work. very nice.

@Masd925 @Blauelf thanks folks, learnt something valuable again
CamperBot
@camperbot
Aug 22 2017 09:02 UTC
kjuchtmans sends brownie points to @masd925 and @blauelf :sparkles: :thumbsup: :sparkles:
:warning: kjuchtmans already gave masd925 points
:star2: 4577 | @blauelf |http://www.freecodecamp.com/blauelf
Blauelf
@Blauelf
Aug 22 2017 09:05 UTC
@kjuchtmans It's still far from highly efficient. For example, a string like "abcdefg" would not profit from the shortcut, and run as slow as Heap's algorithm.
Morchid Chellali
@Morched23MJ
Aug 22 2017 09:06 UTC

I have been using CSS transitions, when using the CSS preprocessor Sass, I had an error with this code

li
    -webkit-transition:all 0.s ease-out
    -moz-transition:all 0.s ease-out
    -ms-transition:all 0.s ease-out
    -o-transition:all 0.s ease-out
    transition:all 0.s ease-out

The error was: Invalid CSS after "...transition:all ": expected selector, was "0.3s ease-out"

limbu
@limbu
Aug 22 2017 09:21 UTC
hi guys just like we use this to run js when p[age is ready $(function () {});
is there one where we use it when the ajax call is ready?
Blauelf
@Blauelf
Aug 22 2017 09:23 UTC
@Morched23MJ Maybe you need a space after the colon?
@limbu AJAX calls allow for defining a callback function, or promise .then. Otherwise, the whole first A would not make much sense.
limbu
@limbu
Aug 22 2017 09:26 UTC
@Blauelf sorry blauelf i'm not great with js and ajax :(
Morchid Chellali
@Morched23MJ
Aug 22 2017 09:26 UTC
@Blauelf, yeah. Thank you.
CamperBot
@camperbot
Aug 22 2017 09:26 UTC
morched23mj sends brownie points to @blauelf :sparkles: :thumbsup: :sparkles:
:star2: 4578 | @blauelf |http://www.freecodecamp.com/blauelf
Blauelf
@Blauelf
Aug 22 2017 09:31 UTC
@Morched23MJ My guess is that in Sass the line could start with a CSS selector, creating nested rules, and :all might be considered a pseudo-class. But there's no valid selector ending in a colon.
Razvan Jackson
@RazvanJackson
Aug 22 2017 09:36 UTC
Hello
Can someone help me with toolti problem?
tooltip*
Blauelf
@Blauelf
Aug 22 2017 09:40 UTC
@RazvanJackson Stop asking meta-questions, ask real questions.
Razvan Jackson
@RazvanJackson
Aug 22 2017 09:40 UTC
I want to change the title of a tooltip
when i click
I use addEventListenr('click')
It's changing the title, but jquery it's still using the default title
And it's showing 2 tooltips
1 correct without style and the default one with style
Razvan Jackson
@RazvanJackson
Aug 22 2017 09:46 UTC
Anyone?
Morchid Chellali
@Morched23MJ
Aug 22 2017 09:58 UTC
Any link to your work?
Razvan Jackson
@RazvanJackson
Aug 22 2017 09:59 UTC
here's a demo
Chris Juchtmans
@kjuchtmans
Aug 22 2017 10:12 UTC

@Masd925 If I understand your example correctly, on the final loop the code would output not // 'stnaptac', but in fact //" " 'stnaptac' ; i.e. creating the empty string and concatenating the accumulated string sequence 'stnaptac'

Is that correct?

Matej Bošnjak
@mbosnjak01
Aug 22 2017 10:16 UTC
Hi everyone. Quick question about Bootstrap modal and JS. I made a small js function which, on close button click, removes all content from modal divs so other data could be stored there for a display. ... To do that I had to remove default closing for modal (clicking outside of modal to close it, with data-keyboard='false' data-backdrop='static') ... Would someone know how to capture that default modal close event from a bootstrap inside javascript function so I could have sam function functionality without having current restriction?
Markus Kiili
@Masd925
Aug 22 2017 10:27 UTC
@kjuchtmans When we make the function call reverseString("catpants"); an execution context is formed where parameter str holds the string "catpants" and the code is run. The code has a line return reverseString(str.substring(1)) + str.charAt(0); which evaluates to return reverseString("atpants") + "c" . So the engine has to evaluate that function call before the first execution context can finish. So several function calls get made and all the functions wait until the last one hits that terminating condition if (str.length===0) return "";. The last function call is return reverseString("") + "s"; that evaluates to "" + "s" which is "s". So first the last call reverseString("") is evaluated and the execution context vanishes. Then reverseString("s") evaluates. Then reverseString("ts"), then reverseString("nts") until eventually reverseString("catpants") evaluates to 'stnaptac'.
So, each function call makes another function call with simpler and simpler argument, until the terminating condition is hit and all the function finish and return in reverse order.
Chris Juchtmans
@kjuchtmans
Aug 22 2017 10:41 UTC
@Masd925 okay, got that. initially "" + "s" equals "s" got me confused but now it's clear.
As a matter of interest, do you in general prefer using recursion to for-loops, or does that depend on circumstances, e.g. data size etc?
Markus Kiili
@Masd925
Aug 22 2017 10:45 UTC
@kjuchtmans Whether you use recursion or loops is usually a matter of programming paradigm to use. Pure functional programming uses recursion instead of loops. On some problems recursion can be useful and produce more elegant and short solution. Javascript doesn't optimize recursion, so you learn not to use it too much, or make sure that the recursion doesn't get deep and crash the browser etc.
Blauelf
@Blauelf
Aug 22 2017 11:11 UTC
ES6 includes tail call optimization, which should lessen the weight of recursion. Sadly, that part is hard to implement, and rarely is.
Abhinav Mishra
@abhinav-m
Aug 22 2017 11:13 UTC
I have a question about fetch api
apparently if you pass {mode:no-cors} to a server on another domain, trying to do a cross origin request
the request succeeds but the response is an opaque object
(one you can't read from)
whats the use of this
Emmanuel Akodia
@akodiaemma
Aug 22 2017 11:22 UTC
how can i create 241 active emails in under 2 hours
any one have any ideas how can i create 241 active emails in under 2 hours
Blauelf
@Blauelf
Aug 22 2017 11:28 UTC

Define "241 active emails".

To me, an email is a message implementing RFC822 and others, those are not very active (I don't want animated gifs or JavaScript in emails). There also are email servers, which route/transfer emails on the way to their destination. Those might be pretty active. There are also accounts on those servers. What "active" means related to those is open to interpretation.

Abhinav Mishra
@abhinav-m
Aug 22 2017 11:34 UTC
I wanna learn about DOM events and how a page loads , the sequence of events etc
is there some good material for this i can refer to
Emmanuel Akodia
@akodiaemma
Aug 22 2017 11:38 UTC
@Blauelf like for example gmail accounts or hotmail
with the word @gdfdf.com at the end
is it possible
Hills
@Hillsie
Aug 22 2017 11:39 UTC
@abhinav-thinktank Do you mean JQuery or the DOM itself?
Blauelf
@Blauelf
Aug 22 2017 11:39 UTC
@akodiaemma Don't you think that this is against their terms of service?
Abhinav Mishra
@abhinav-m
Aug 22 2017 11:40 UTC
the DOM itself
Emmanuel Akodia
@akodiaemma
Aug 22 2017 11:41 UTC
@Blauelf not by the same person but i have a list of names and i want to do is make it quickly s possible. kind of like a first name, last name ..press enter and viola. NEXT
that kinda thing
im making for some school where im from
is that illegal? :(
Hills
@Hillsie
Aug 22 2017 11:41 UTC
@akodiaemma I vaguely remember something about being popped onto a spam list for large email delivery.
Might want to research that some more.
Blauelf
@Blauelf
Aug 22 2017 11:43 UTC
@akodiaemma What do you mean with @gdfdf.com? Are the email addresses meant to end with that? If so, shouldn't you use the associated mail server?
Markus Kiili
@Masd925
Aug 22 2017 11:43 UTC
@abhinav-thinktank DOM manipulation and event handling is a hard subject because it is hard to find a good reference text. MDN has material but you need to find it here and there.
Abhinav Mishra
@abhinav-m
Aug 22 2017 11:44 UTC
@Masd925 im digging articles here and there right now
was looking for something that can be more consolidated in one place
a post i found, but it's a bit old
Markus Kiili
@Masd925
Aug 22 2017 11:46 UTC
@abhinav-thinktank You wan't to know what events fire when a document loads?
Abhinav Mishra
@abhinav-m
Aug 22 2017 11:46 UTC
yea, like how a page is parsed completely
Hills
@Hillsie
Aug 22 2017 11:46 UTC
@akodiaemma I think you might want to stop in at https://www.safaribooksonline.com/search/?query=Dom, Get a 7 day free trial and study your ass off.
Abhinav Mishra
@abhinav-m
Aug 22 2017 11:47 UTC
for event handling and DOM manipulation i referred to EloquentJS
it had a good primer on it
Markus Kiili
@Masd925
Aug 22 2017 11:49 UTC
@abhinav-thinktank That might get into browser specific things. JS, DOM, and HTML all have their specifications, but how they cook up the page might depend on the browser.
Abhinav Mishra
@abhinav-m
Aug 22 2017 11:50 UTC
yes, i was reading about that
Hills
@Hillsie
Aug 22 2017 11:50 UTC
Some advice pls. I’m at that part where the "intermediate Front end projects”, but or I’m not that keen to deep dive into JQuery. My plan is to become quite familar with React. Should I start by implementing these in React? Any holes in this plan?
Abhinav Mishra
@abhinav-m
Aug 22 2017 11:50 UTC
i want an overview though, not getting into browser specific stuff
@Masd925 so far i know about a few methods such as ONDOMContentLoaded , onload and how scripts are loaded to the page
Markus Kiili
@Masd925
Aug 22 2017 11:52 UTC
@abhinav-thinktank You can find content about those events on MDN.
Blauelf
@Blauelf
Aug 22 2017 11:54 UTC
@Hillsie If you can find some use for React (and not just dynamically dump a static website), I'd say use whatever you want.
Just adding a technology for the sake of using it does not seem to have much learning potential.
Markus Kiili
@Masd925
Aug 22 2017 11:55 UTC
@abhinav-thinktank You can also find stuff about how the JS engine interacts with other parts of the browser (the heap and stack, and with web api's (dom, ajax etc), event loop, render queue and callback queue). Not sure where I read about those. I always take notes when I find something somewhere about these subjects.
Emmanuel Akodia
@akodiaemma
Aug 22 2017 11:56 UTC
@Blauelf its okay.. thank you for your help
CamperBot
@camperbot
Aug 22 2017 11:56 UTC
akodiaemma sends brownie points to @blauelf :sparkles: :thumbsup: :sparkles:
:star2: 4579 | @blauelf |http://www.freecodecamp.com/blauelf
Hills
@Hillsie
Aug 22 2017 11:58 UTC
@Blauelf Yip, probably be dumping static as I start while I learn, but I think its time to plunge. lets go. About time I start that business idea I have been dreaming of. Need the income.
Jake
@JakeDVirus
Aug 22 2017 12:03 UTC
just a quick question. what shall i learn first, react.js or node.js? i already know JS in-depth and jquery
i mean is their any advantage on choosing one to learn first over another, or is it merely a matter of personal preferance and choice?
Abhinav Mishra
@abhinav-m
Aug 22 2017 12:06 UTC
@Masd925 ok, thank you, yes im looking for that sort of content .
CamperBot
@camperbot
Aug 22 2017 12:06 UTC
abhinav-thinktank sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles:
:star2: 4428 | @masd925 |http://www.freecodecamp.com/masd925
Hills
@Hillsie
Aug 22 2017 12:07 UTC
From my understanding, react is mainly front end. You can run it back end, I believe. Node.js has a whole bunch of options. React is mainly one style of coding. It uses its own virtual dom inside the browser, so they take care of the implementation. It also makes it easier to have a mobile implementation with react native.
Markus Kiili
@Masd925
Aug 22 2017 12:08 UTC
@NeelDVirus What did you find in your journey to the depths? Fat Ungoliant like Global object was lying there holding the integer type under his armpit?
Nick
@Nick-vr
Aug 22 2017 12:09 UTC
React is not back end.
Hills
@Hillsie
Aug 22 2017 12:11 UTC
good to know. can’t you npm install it? Or is that only for just getting the library?
Nick
@Nick-vr
Aug 22 2017 12:12 UTC
npm install has nothing to do with front or back end, it's just to get the library you want to use into your project
Jake
@JakeDVirus
Aug 22 2017 12:12 UTC
@Nick-vr @Hillsie yeah i know react if for front end and node is server side. i was wondering should i move to server side with node.js or shall move for server side after completing react.js
Hills
@Hillsie
Aug 22 2017 12:13 UTC
@NeelDVirus depends on your end game.
Nick
@Nick-vr
Aug 22 2017 12:13 UTC
Depends what you want to do
Hills
@Hillsie
Aug 22 2017 12:13 UTC
ditto
:)
Nick
@Nick-vr
Aug 22 2017 12:13 UTC
But in general I think learning react first is easier
Jake
@JakeDVirus
Aug 22 2017 12:14 UTC
@Masd925 i saw some answers in quora and there it was mention to have a strong foundation of JS before approaching for either. so i made that point with that one word "indepth". My appologies if i sounded silly
Markus Kiili
@Masd925
Aug 22 2017 12:16 UTC
@NeelDVirus Yeah, just joking ;)
Nick
@Nick-vr
Aug 22 2017 12:16 UTC
You were right to do so, good job :)
Kelechi Chinaka
@ke1echi
Aug 22 2017 12:18 UTC
i think it would be logically correct to do react before node
Jake
@JakeDVirus
Aug 22 2017 12:19 UTC
@Hillsie @Nick-vr end game have to deal with both, node.js and react.js. my concern is for optimized learning
@Masd925 :D
Abhinav Mishra
@abhinav-m
Aug 22 2017 12:20 UTC
@NeelDVirus if youre good with vanilla js
learning either shouldn't be an issue
Nick
@Nick-vr
Aug 22 2017 12:20 UTC
Then do react > node
Abhinav Mishra
@abhinav-m
Aug 22 2017 12:21 UTC
yeah, that seems to be a good path
Jake
@JakeDVirus
Aug 22 2017 12:21 UTC
@Nick-vr @kelechy Thanks for making it easy for me to make a decision :)
CamperBot
@camperbot
Aug 22 2017 12:21 UTC
neeldvirus sends brownie points to @nick-vr and @kelechy :sparkles: :thumbsup: :sparkles:
:cookie: 281 | @nick-vr |http://www.freecodecamp.com/nick-vr
:cookie: 303 | @kelechy |http://www.freecodecamp.com/kelechy
Jake
@JakeDVirus
Aug 22 2017 12:21 UTC
@abhinav-thinktank i presume so
Nick
@Nick-vr
Aug 22 2017 12:21 UTC
No problem :)
Hills
@Hillsie
Aug 22 2017 12:22 UTC
just to change the subject slightly, did you see a group has created a javascript os. https://node-os.com/
Greg Duncan
@GregatGit
Aug 22 2017 12:25 UTC
@NeelDVirus if you are going to learn react check out create-react-app. It sets up the environment for you and gets you started. Just go to the CRA gitHub repo
Jake
@JakeDVirus
Aug 22 2017 12:25 UTC
surprised man @Hillsie
@GregatGit Great!! thanks for the suggestion man
CamperBot
@camperbot
Aug 22 2017 12:27 UTC
neeldvirus sends brownie points to @gregatgit :sparkles: :thumbsup: :sparkles:
:cookie: 879 | @gregatgit |http://www.freecodecamp.com/gregatgit
Hills
@Hillsie
Aug 22 2017 12:28 UTC
@NeelDVirus me too.
@GregatGit Yip, thanks. Also about to take on that journey
CamperBot
@camperbot
Aug 22 2017 12:28 UTC
hillsie sends brownie points to @gregatgit :sparkles: :thumbsup: :sparkles:
:cookie: 880 | @gregatgit |http://www.freecodecamp.com/gregatgit
Blauelf
@Blauelf
Aug 22 2017 12:29 UTC
In my opinion, Node.js as primary runtime is at least scary. As much as I'm fascinated by JavaScript, I'm worried about its features, especially the ones I did not intend to use. And even more the features of tools like npm.
Matej Bošnjak
@mbosnjak01
Aug 22 2017 12:48 UTC
Hi everyone. Quick question about Bootstrap modal and JS. I made a small js function which, on close button click, removes all content from modal divs so other data could be stored there for a display. ... To do that I had to remove default closing for modal (clicking outside of modal to close it, with data-keyboard='false' data-backdrop='static') ... Would someone know how to capture that default modal close event from a bootstrap inside javascript function so I could have sam function functionality without having current restriction?
Hills
@Hillsie
Aug 22 2017 12:54 UTC

@Nick-vr

React is not back end.

https://facebook.github.io/react/
I just took a look on the react website. It has this line on it.

React can also render on the server using Node and power mobile apps using React Native.

… not sure about what that means or exactly how that’s done.

Hills
@Hillsie
Aug 22 2017 13:03 UTC
@NeelDVirus The react website tutorial starts with a tic-tac-toe game. https://facebook.github.io/react/tutorial/tutorial.html
Karol
@nef4r1us
Aug 22 2017 13:26 UTC
any good vue resources except udemy and official docs?
Stephen James
@sjames1958gm
Aug 22 2017 13:44 UTC
@Hillsie server rendering means that the back end does the React rendering, so the front end doesn't do the React rendering.
Margaret
@Margaret2
Aug 22 2017 13:45 UTC
@Masd925 :laughing: :laughing:
Hills
@Hillsie
Aug 22 2017 13:46 UTC
@sjames1958gm Thanks Stephen. Yip, I was aware thats how it woulld work.
CamperBot
@camperbot
Aug 22 2017 13:46 UTC
hillsie sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8360 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Guderian Raborg
@hypercuber
Aug 22 2017 14:00 UTC
@GregatGit @SkyC0der Thanks guys.
CamperBot
@camperbot
Aug 22 2017 14:00 UTC
hypercuber sends brownie points to @gregatgit and @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 2528 | @skyc0der |http://www.freecodecamp.com/skyc0der
:cookie: 881 | @gregatgit |http://www.freecodecamp.com/gregatgit
Margaret
@Margaret2
Aug 22 2017 14:20 UTC
@nef4r1us this is a good book https://www.amazon.com/Learning-Vue-js-2-Olga-Filipova-ebook/dp/B01JLBMCAY
i'm sure there's also plenty of stuff on Youtube
limbu
@limbu
Aug 22 2017 14:32 UTC
has anybody had an issue when trying to set the width of a select dropdown box?
Ken Haduch
@khaduch
Aug 22 2017 14:35 UTC
@limbu - what have you tried?
limbu
@limbu
Aug 22 2017 14:47 UTC
@khaduch i have tried adjusting the width of the select and option boxes but
the option width is applied automatically using the longest string in the select box
Johnny
@JohnnyBizzel
Aug 22 2017 15:09 UTC
@limbu That's usually how they work - what if the user changes the font size?
Jason Luboff
@JLuboff
Aug 22 2017 15:14 UTC
@JohnnyBizzel :wave:
Johnny
@JohnnyBizzel
Aug 22 2017 15:14 UTC
@JLuboff :fist:
Jason Luboff
@JLuboff
Aug 22 2017 15:15 UTC
How's it going?
Johnny
@JohnnyBizzel
Aug 22 2017 15:15 UTC
@JLuboff Ok. I'm still on Voting app but watching Angular videos! (even though Voting app is REACT)
Jason Luboff
@JLuboff
Aug 22 2017 15:16 UTC
Ah! I still haven't looked much into Angular/React/etc
I just used Bulma CSS for my frontend
Johnny
@JohnnyBizzel
Aug 22 2017 15:16 UTC
@JLuboff No? What's keeping you?
Jason Luboff
@JLuboff
Aug 22 2017 15:16 UTC
Too much stuff to learn :D
Johnny
@JohnnyBizzel
Aug 22 2017 15:16 UTC
I know -_-
Jason Luboff
@JLuboff
Aug 22 2017 15:16 UTC
I'm focusing on backend since it applies the most to my current job
Markus Kiili
@Masd925
Aug 22 2017 15:17 UTC
@JLuboff @JohnnyBizzel Hello.
Jason Luboff
@JLuboff
Aug 22 2017 15:17 UTC
I'm also studying for multiple Microsoft certification exams so I have to split my time
@Masd925 Hey, how goes it?
Johnny
@JohnnyBizzel
Aug 22 2017 15:17 UTC
@Masd925 Hi. What's new with you?
@JLuboff ah MS! You are going for MVP?
Markus Kiili
@Masd925
Aug 22 2017 15:18 UTC
@JohnnyBizzel Porting some animations from Flash to canvas for a change. Then back to porting old java applets to angular.
Jason Luboff
@JLuboff
Aug 22 2017 15:18 UTC
@JohnnyBizzel I'm getting the three MTA certs (IT Infastructure, Databse, and Developer) as a stepping stone, then going for MCSA SQL 2012/2014 (which is three tests)
Johnny
@JohnnyBizzel
Aug 22 2017 15:18 UTC
@Masd925 Sounds fun :D
Markus Kiili
@Masd925
Aug 22 2017 15:18 UTC
Learning how to use Adobe animateCC.
Jason Luboff
@JLuboff
Aug 22 2017 15:19 UTC
@Masd925 How difficult is it to port that?
Markus Kiili
@Masd925
Aug 22 2017 15:20 UTC
@JLuboff It depends how much interactivity there is and how old the Actionscript is on flash. The actionscript needs to be transformed into JS manually.
Johnny
@JohnnyBizzel
Aug 22 2017 15:20 UTC
Sorry for the long link - it's SWF
@JLuboff Good luck with all that!!
Jason Luboff
@JLuboff
Aug 22 2017 15:21 UTC
@Masd925 Gotcha. The last website I made in Flash was 2004?2005? I can't remember it was so long ago!
@JohnnyBizzel Thanks!
CamperBot
@camperbot
Aug 22 2017 15:21 UTC
jluboff sends brownie points to @johnnybizzel :sparkles: :thumbsup: :sparkles:
:star2: 1743 | @johnnybizzel |http://www.freecodecamp.com/johnnybizzel
Markus Kiili
@Masd925
Aug 22 2017 15:22 UTC
@JLuboff Java applets -> Angular gets interesting because clients have ancient browsers and must also work offline.
Jason Luboff
@JLuboff
Aug 22 2017 15:22 UTC
@Masd925 How does that work? Is it designed to still run in the browser or?
Johnny
@JohnnyBizzel
Aug 22 2017 15:22 UTC
kiosk mode?
Markus Kiili
@Masd925
Aug 22 2017 15:23 UTC
@JLuboff Yeah, mostly old IE's cause headache.
@JLuboff They install it from a memory stick mostly.
Johnny
@JohnnyBizzel
Aug 22 2017 15:24 UTC
@Masd925 Rather you than me! :hear_no_evil:
Jason Luboff
@JLuboff
Aug 22 2017 15:24 UTC
Hmmm.
Johnny
@JohnnyBizzel
Aug 22 2017 15:25 UTC
@Masd925 Angular 2/4 is it?
Markus Kiili
@Masd925
Aug 22 2017 15:26 UTC
@JohnnyBizzel The old angular, whatever it is called nowadays. Angular 1.4.7 I think.
Johnny
@JohnnyBizzel
Aug 22 2017 15:27 UTC
@Masd925 I was told on StackOverflow it is AngularJS. Angular 2 = Angular. (but version 4 is out now).
Hard to keep track!!
Moisés Man
@moigithub
Aug 22 2017 15:27 UTC
1.6 was the last 1.x version i think
Markus Kiili
@Masd925
Aug 22 2017 15:28 UTC
@JohnnyBizzel What is it that you do for work?
Johnny
@JohnnyBizzel
Aug 22 2017 15:28 UTC
@Masd925 I am between jobs right now :P
@Masd925 I have savings...
Markus Kiili
@Masd925
Aug 22 2017 15:29 UTC
@JohnnyBizzel Good thing is that you can study a lot then.
Johnny
@JohnnyBizzel
Aug 22 2017 15:29 UTC
Actually, I was thinking about Freelancing or contracting.
@Masd925 Yes, when I have the motivation.
I try to do something every day.
Jason Luboff
@JLuboff
Aug 22 2017 15:31 UTC
Motivation can be tough on days off...
Markus Kiili
@Masd925
Aug 22 2017 15:31 UTC
@JohnnyBizzel My job is totally independent, so I am fantasizing about some senior programmer periodically shouting at me how bad I am. Next job hopefully is something like that.
Johnny
@JohnnyBizzel
Aug 22 2017 15:31 UTC
Yesterday I watched the eclipse!
Which was amazing as they kept saying!
Jason Luboff
@JLuboff
Aug 22 2017 15:31 UTC
I went outside to watch for about 15 minutes during work then went back inside lol Only about 60% coverage here
Johnny
@JohnnyBizzel
Aug 22 2017 15:31 UTC
@Masd925 It doesn't work like that in my experience.
@JLuboff Did you see the skydivers?
@Masd925 You get assigned tasks and are left do to them.
Jason Luboff
@JLuboff
Aug 22 2017 15:32 UTC
@JohnnyBizzel skydivers? I'd imagine you'd have to be in a certain region to see them?
Markus Kiili
@Masd925
Aug 22 2017 15:33 UTC
@JohnnyBizzel Yeah. There was a more experienced programmer here but he left earlier. Bad thing.
Johnny
@JohnnyBizzel
Aug 22 2017 15:34 UTC
@JLuboff on Time.com
Jason Luboff
@JLuboff
Aug 22 2017 15:36 UTC
@JohnnyBizzel Thats pretty neat
Johnny
@JohnnyBizzel
Aug 22 2017 15:37 UTC
@JLuboff Yes, one day I hope to experience it myself. Last time it was in the UK it was cloudy!
Jason Luboff
@JLuboff
Aug 22 2017 15:37 UTC
It was overcast a bit here, but the clouds were moving so got a couple good glimpses of it
Johnny
@JohnnyBizzel
Aug 22 2017 15:37 UTC
@JLuboff :+1:
@JLuboff Do you have any sample questions for your MS Certs?
Jason Luboff
@JLuboff
Aug 22 2017 15:41 UTC
@JohnnyBizzel I'm been using aiotestking.com so basically actual questions (albeit, for the test I'm taking people say they aren't the same, which is fine, practice is practice)
Johnny
@JohnnyBizzel
Aug 22 2017 15:45 UTC
@JLuboff Yes, past exam questions are good. The site isn't easy to work with though.
Jason Luboff
@JLuboff
Aug 22 2017 15:46 UTC
@JohnnyBizzel No it's not. In the past I used VCE files from examcollection, but I no longer have a working VCE program and don't want to pay for one so...thats what I got lol
Johnny
@JohnnyBizzel
Aug 22 2017 15:46 UTC
Better than nothing
Jason Luboff
@JLuboff
Aug 22 2017 15:47 UTC
Exactly. I had forgotten how much info the official MS books are missing in comparison to the questions they ask. That, and how stupidly easy the free practice exam given with the book are
Bradley Sands
@sandsbe
Aug 22 2017 15:48 UTC
Microsoft cert vs. Oracle vs. others?
The Beau guy claimed he knocked out a ton of them in a very short amount of time. Good Medium write-up on the process.
Jason Luboff
@JLuboff
Aug 22 2017 15:51 UTC
I'll be knocking out 3 in hopefully less than 6 months time. Then the next 3 will probably take me a year+
Bradley Sands
@sandsbe
Aug 22 2017 15:54 UTC
Dayum.
Finally finished my Front End Cert. Anyone know how to actually share this thing on Twitter? If you DL the jpeg your name isn't on it.
Stephen James
@sjames1958gm
Aug 22 2017 15:54 UTC
@sandsbe Day-O Day-O
Jason Luboff
@JLuboff
Aug 22 2017 15:54 UTC
@sandsbe Share it via the link
Stephen James
@sjames1958gm
Aug 22 2017 15:55 UTC
@sandsbe Grats!
Bradley Sands
@sandsbe
Aug 22 2017 15:57 UTC
Ya. Wouldn't have finished without this chat community. Really appreciate everyone's help @sjames1958gm @JLuboff (plus like 10 more awesome people).
Stephen James
@sjames1958gm
Aug 22 2017 15:57 UTC
@sandsbe :+1:
Bradley Sands
@sandsbe
Aug 22 2017 15:57 UTC
I put in the link in Twitter, big fail. I'll try again.
Jason Luboff
@JLuboff
Aug 22 2017 15:57 UTC
:)
Bradley Sands
@sandsbe
Aug 22 2017 15:58 UTC
Nope. Fail.
Bradley Sands
@sandsbe
Aug 22 2017 16:03 UTC
Holy goodness that took a lot of tries. Need to get the image address, different from the cert address (imgur), and then add it as a photo, which doesn't always work. Had it ask my for imgur credentials a few times.
Nvm. It doesn't have my name on it.
Daniel Romero
@Ranacode
Aug 22 2017 16:19 UTC
Hello guys
I'm having this error Cannot set property 'Tether' of undefined, it seems that the Tether variable is not attaching to the window object
I'm doing the bundle with "Gulp"
Kelechi Chinaka
@ke1echi
Aug 22 2017 16:22 UTC
the error tells u that you are looking for a property Tether from something that is not defined @Ranacode
Daniel Romero
@Ranacode
Aug 22 2017 16:23 UTC
The thing is, I'm just concatenating javascript files
in this order (jquery, tether and bootstrap.js)
Kelechi Chinaka
@ke1echi
Aug 22 2017 16:25 UTC
show code so you can get help
Daniel Romero
@Ranacode
Aug 22 2017 16:28 UTC
gulp.task('bootstrap-scripts', (errorHandler) => {
    pump([
        gulp.src(
            ['node_modules/jquery/dist/jquery.slim.min.js',
                'node_modules/tether/dist/js/tether.min.js',
                'node_modules/botstrap/dist/js/bootstrap.min.js/'
            ]),
        uglify(),
        concat('bootstrap_bundle.js'),
        gulp.dest(path.resolve(__dirname, 'public/js'))
    ], errorHandler)
})
Pethaf
@Pethaf
Aug 22 2017 16:28 UTC
@Ranacode Does it say something like "Teather needed for tooltips"?
Daniel Romero
@Ranacode
Aug 22 2017 16:28 UTC
No
Just the "Cannot set property 'Tether' of undefined"
Ok nothing I solved it
I was using the babel library to transpile that the bootstrap code
Bad idea
Keith
@7KAG7
Aug 22 2017 16:39 UTC
does anyone know why this url wouldnt work for the twich api? https://api.twitch.tv/kraken/streams/freecodecamp?callback=?
do i have to sign up for a client ID?
Pethaf
@Pethaf
Aug 22 2017 16:42 UTC
Don't you have to specify an actual callback function?
Keith
@7KAG7
Aug 22 2017 16:42 UTC
i tried that
it didnt work then either
Eric
@Zaknefeinn
Aug 22 2017 16:42 UTC
Read the update
on the project's description, i Mean
Keith
@7KAG7
Aug 22 2017 16:44 UTC
ohhhhh, good call. thanks @Zaknefeinn
CamperBot
@camperbot
Aug 22 2017 16:44 UTC
dudeguykid sends brownie points to @zaknefeinn :sparkles: :thumbsup: :sparkles:
:cookie: 249 | @zaknefeinn |http://www.freecodecamp.com/zaknefeinn
Eric
@Zaknefeinn
Aug 22 2017 16:45 UTC
That project was a HUGE pain in the ass. The forum here explains how you can get around it. They added key's after the project was made. https://forum.freecodecamp.org/t/freecodecamp-challenge-guide-how-to-use-the-twitchtv-api/19541/2
Datikzz
@Datikzz
Aug 22 2017 16:47 UTC
guys, can't apply my value to input text https://codepen.io/Datik/pen/qXYLXW
Gulsvi
@gulsvi
Aug 22 2017 16:52 UTC
@Datikzz Use .value to update a <input> field, not innerHTML:
function f1(objButton) {
  answer.value = objButton.value;
}
Nicolas Ramirez
@kamatheuska
Aug 22 2017 16:53 UTC
Hey people, I keep getting an error on this proyect of mine, here is a fiddle of it. https://jsfiddle.net/0ab2m0ne/2/
Stephen James
@sjames1958gm
Aug 22 2017 16:54 UTC
@kamatheuska What error?
Nicolas Ramirez
@kamatheuska
Aug 22 2017 16:55 UTC
TypeError: json.forEach is not a function
Stephen James
@sjames1958gm
Aug 22 2017 16:55 UTC
@kamatheuska Which action causes this?
Nicolas Ramirez
@kamatheuska
Aug 22 2017 16:55 UTC
I made the fiddle without the JSON file, but I am running it on my apache2 server
wait a sec
Morchid Chellali
@Morched23MJ
Aug 22 2017 16:56 UTC
I have just finished the Calculator project. Looking forward to get some feedback, check it out: https://codepen.io/Morched23MJ/full/Ljezav/
Nicolas Ramirez
@kamatheuska
Aug 22 2017 16:57 UTC
$(function(){
  var user = ["ivoneparra","saulparra","kamatheuska"];
  var current_user = user[0];  
  var greeting = "¡Hola! " + current_user + ",";
  var greeting2 = "¿Qué quieres hacer hoy?";
  var toType = greeting.split("");
  var toType2 = greeting2.split("");
  var i = 0;
  var j = i;
  var t1 = "target";
  var t2 = "target2";

  var myVar = setInterval(typingMachine, 38, "swing");

  function typingMachine() { 
    if (i < toType.length) {
      document.getElementById(t1).textContent += toType[i];
      i++;
    } else if (j < toType2.length) {
      document.getElementById(t2).textContent += toType2[j];
      j++;
    }
    else {
      clearInterval(myVar);
    } 
  }

// Botones de data.html

  var folders = ["#folderDecoy","#folder1","#folder2","#folder3","#folder4"];

  function showFolders(firstDelay, interval) {
    for (var i = 0; i < folders.length; i++) {
      $(folders[i]).delay(firstDelay).fadeIn(1000);
      firstDelay += interval;
    }
  }

  function showMenu() {
    var $menuID = $(this).attr('data-btnid');
    if (!($(this)).hasClass('hidden')) {
      alert("'if' from showMenu working ");
      console.log("Checkpoint 1");
      $('.btnData').addClass('hidden');
      $(this).removeClass('hidden'); 
      $(".hidden").fadeToggle();
      $($menuID).delay(700).fadeToggle();
      $(this).addClass('hidden');
    } else {
      alert("'else' from showMenu working");
      $(this).removeClass('hidden');
      $($menuID).fadeToggle();
      $('.hidden').delay(700).fadeToggle();
      $('.btnData').removeClass('hidden'); 
    }

  }

  showFolders(200,300);
  $('.btnData').on('click', showMenu);

  function showForm() {
      console.log("Checkpoint 2");

    $.getJSON("../javascript/stock.json", function(json) {
      console.log(json)
      var html = "";
      json.forEach(function(val) {
      //console.log("Checkpoint 3");
     // console.log("Checkpoint FOR EACH1");
        var keys = Object.keys(val);
        html += "<div class = 'stock'>";
        keys.forEach(function(key) {
          html += "<strong>" + key + "</strong>: " + val[key] + "<br>";
        });
        html += "</div><br>";
      });
      $("#product_consult").html(html);
    });
  }

  $('.dbLink').on('click', showForm);
});
Stephen James
@sjames1958gm
Aug 22 2017 16:57 UTC
@kamatheuska Just getting a 404 not found - because jsfiddle doesn't know about the file (URL is local)
Nicolas Ramirez
@kamatheuska
Aug 22 2017 16:57 UTC
the error is at the bottom, function showForm, the first forEach
Stephen James
@sjames1958gm
Aug 22 2017 16:57 UTC
@kamatheuska Is your json an object or array?
Nicolas Ramirez
@kamatheuska
Aug 22 2017 16:58 UTC
object
I already validate it
Stephen James
@sjames1958gm
Aug 22 2017 16:58 UTC
forEach is for arrays.
Nicolas Ramirez
@kamatheuska
Aug 22 2017 16:58 UTC
oh
Stephen James
@sjames1958gm
Aug 22 2017 16:58 UTC
you can use for .. in
Nicolas Ramirez
@kamatheuska
Aug 22 2017 16:58 UTC
mmm then what should I use?
Nicolas Ramirez
@kamatheuska
Aug 22 2017 16:59 UTC
@sjames1958gm for..in
ok...I will look at it, thanks @sjames1958gm :)
CamperBot
@camperbot
Aug 22 2017 16:59 UTC
kamatheuska sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8361 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Datikzz
@Datikzz
Aug 22 2017 16:59 UTC
simple calc action, why Switch case always get me default? https://codepen.io/Datik/pen/qXYLXW?editors=1010
Stephen James
@sjames1958gm
Aug 22 2017 16:59 UTC
@kamatheuska :+1:
@Datikzz No break; so it falls through to default:
luccifer00
@luccifer00
Aug 22 2017 17:01 UTC
 var newEl=document.getElementById('row')
  for (var i =0; i<user.length; i++){
  newEl.appendChild(clonbloq).id = 'row'+[i];     

  };
hi again!, i have this loop, but i only can créate a new row before the original... i check out on HTML code and i found the div id have row14, so the loop is wrong... i am missing something, becouse i want to créate a row before the other... some help?
Ayush Bahuguna
@relentless-coder
Aug 22 2017 17:02 UTC
@luccifer00 if you can use let i = 0 or use an iffe
Datikzz
@Datikzz
Aug 22 2017 17:02 UTC
@sjames1958gm thanks
CamperBot
@camperbot
Aug 22 2017 17:02 UTC
datikzz sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8362 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Aug 22 2017 17:05 UTC
@luccifer00 You are only going to get one element here - it will just keep appending the same clonbloq
luccifer00
@luccifer00
Aug 22 2017 17:06 UTC
@sjames1958gm i know ... but my lógic cant figure out on how to do it... i was testing so many diferents options...
so i append the clonbloq , and i want to append other bloq to the previsuly created clonbloq
how?? i was testing with append, appendChild, insertAdjacent... inside the loop, outside the loop... but not result..
Stephen James
@sjames1958gm
Aug 22 2017 17:08 UTC
You want multiple rows?
luccifer00
@luccifer00
Aug 22 2017 17:09 UTC
i am Reading about @relentless-coder IIFE sais... its about créate a function inside the loop... maybe is that..
@sjames1958gm yes!, i want multiply rows yess
Stephen James
@sjames1958gm
Aug 22 2017 17:10 UTC
You want them as siblings of 'row' ?
luccifer00
@luccifer00
Aug 22 2017 17:10 UTC
yess..
Stephen James
@sjames1958gm
Aug 22 2017 17:10 UTC

like this:

<div>
<div id="row"></div>
<div id="row0"></div>
</div>

Ronique Ricketts
@RoniqueRicketts
Aug 22 2017 17:10 UTC
@sjames1958gm https://codepen.io/Ronique/pen/EXMRNB idk what to do to make the computer putin value
Stephen James
@sjames1958gm
Aug 22 2017 17:11 UTC
@luccifer00 Then appendChild to the parent of "row"
luccifer00
@luccifer00
Aug 22 2017 17:12 UTC
and doing that i can multiply n times?
at this momento i dont care if the id is the same or other...
Stephen James
@sjames1958gm
Aug 22 2017 17:12 UTC
@luccifer00 Yes, you can do that in your loop - but you have to create n elements, no use the same one over and over.
luccifer00
@luccifer00
Aug 22 2017 17:13 UTC
i have n number of users.... and in my mind, i use the loop for créate the div element for each user...
Stephen James
@sjames1958gm
Aug 22 2017 17:13 UTC
@RoniqueRicketts You can search for an empty element and put the computer move there.
I kept an array that matched the display and used that to decide where to put the computer move and to check for win/loss/draw
@luccifer00 yes
luccifer00
@luccifer00
Aug 22 2017 17:14 UTC
@sjames1958gm the thing is the div have other divs inside...
if u can take a look @sjames1958gm https://codepen.io/luccifer00/pen/RZQYdM?editors=0011
Ronique Ricketts
@RoniqueRicketts
Aug 22 2017 17:15 UTC
@sjames1958gm lost
Stephen James
@sjames1958gm
Aug 22 2017 17:16 UTC
@RoniqueRicketts keep an array of the board ["", "", "", "", "", "", "", "", ""] as the player plays, put X or O, then the computer can select from the ones still "".
Ronique Ricketts
@RoniqueRicketts
Aug 22 2017 17:17 UTC
@sjames1958gm ok thanks
CamperBot
@camperbot
Aug 22 2017 17:17 UTC
roniquericketts sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8363 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
luccifer00
@luccifer00
Aug 22 2017 17:22 UTC
maybe i should use other methods, but i am explore the JS, and try to reduce code, and i dont know if i can reach with this methd, but i wanna try...
Stephen James
@sjames1958gm
Aug 22 2017 17:29 UTC
@luccifer00 https://codepen.io/silgarth/pen/Bdxbae?editors=1010
You need to loop over your $.ajax and add the elements there.
@luccifer00 I used display:none on the HTML so that it could be cloned and added and the new elements are set display: block to make them appear
luccifer00
@luccifer00
Aug 22 2017 17:33 UTC
@sjames1958gm ! thank you so much.... i was trying to use the Ajax, inside and outide the loop, also i have the second Ajax, to check the status.... thanks for the advice, i will keep on that track
CamperBot
@camperbot
Aug 22 2017 17:33 UTC
luccifer00 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8364 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Aug 22 2017 17:52 UTC
@luccifer00 :+1:
GeorgeII
@GeorgeII
Aug 22 2017 17:52 UTC

Hello!

allCells.forEach(e => e.addEventListener('click', symbolDraw(playerSymbol)));

Where allCells is an array of divs. So I need to know what element was clicked(what classes this element has)

Eric
@Zaknefeinn
Aug 22 2017 17:52 UTC
I'm doing the Exact Change project. I'm sure there are better ways to do it, but I've almost got it done this way. How can I get the change to add together if it is the same currency? https://codepen.io/Zaknefeinn/pen/dzewrX
Stephen James
@sjames1958gm
Aug 22 2017 18:02 UTC
@GeorgeII symbolDraw(playerSymbol) this looks to be calling a function not passing a function reference.
allCells.forEach(e => e.addEventListener('click', (event) => symbolDraw(playerSymbol, event.target)));
You can pass the target element (what was clicked) via event.target
Gulsvi
@gulsvi
Aug 22 2017 18:09 UTC

@GeorgeII Another option:

allCells.forEach(e => e.addEventListener('click', symbolDraw));

function symbolDraw(event) {
  event.target.textContent = playerSymbol;
}

That way you can target the actual cell clicked and add the playerSymbol

GeorgeII
@GeorgeII
Aug 22 2017 18:20 UTC
@SkyC0der thanks that works
CamperBot
@camperbot
Aug 22 2017 18:20 UTC
georgeii sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 2530 | @skyc0der |http://www.freecodecamp.com/skyc0der
GeorgeII
@GeorgeII
Aug 22 2017 18:20 UTC
@sjames1958gm ty too
CamperBot
@camperbot
Aug 22 2017 18:20 UTC
georgeii sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8365 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Aug 22 2017 18:20 UTC
@GeorgeII yw
@Zaknefeinn If the last element in the array name is the same as the current add instead of push
marcus dylan johnson
@mdjohns
Aug 22 2017 18:41 UTC
@relentless-coder Thanks again for your help with the Title Case algorithm. I finally had some time to sit down with that again. Your explanation makes a lot of sense.
CamperBot
@camperbot
Aug 22 2017 18:41 UTC
djohnson501 sends brownie points to @relentless-coder :sparkles: :thumbsup: :sparkles:
:cookie: 374 | @relentless-coder |http://www.freecodecamp.com/relentless-coder
charles
@code9ja
Aug 22 2017 18:55 UTC
Hello guys
I have an issue with my challenge 196 - Comparison with the Greater Than Operator

This is my code``` function testGreaterThan(val) {
if (val > 100) { // Change this line
return "Over 100";
}

if (val > 100) { // Change this line
return " over 100";
}

return "10 or Under";
}

// Change this value to test
testGreaterThan(101);```

marcus dylan johnson
@mdjohns
Aug 22 2017 18:59 UTC
@code9ja the middle if statement should be if (val > 10){ return “Over 10”;}
Eric
@Zaknefeinn
Aug 22 2017 18:59 UTC
^^
sabahatullah
@sabahatullah
Aug 22 2017 19:04 UTC

hello guys, could you please tell me regex for the following, Astericks refers to different page name

www.abc.com/**/thank-you

charles
@code9ja
Aug 22 2017 19:08 UTC
@djohnson501 okay let me try that
sabahatullah
@sabahatullah
Aug 22 2017 19:09 UTC
page names could page-name, pageName, page12Name, 12pagename, PageNAME
charles
@code9ja
Aug 22 2017 19:10 UTC
No it didn't work. It returned over 100
sabahatullah
@sabahatullah
Aug 22 2017 19:15 UTC
@djohnson501 hey could you please help me with the regex for the following url, Astericks refers to different page name
www.abc.com/**/thank-you
page names could page-name, pageName, page12Name, 12pagename, PageNAME etc
Eric
@Zaknefeinn
Aug 22 2017 19:15 UTC
@code9ja Dylan is correct. Reset your code and try again
Kelechi Chinaka
@ke1echi
Aug 22 2017 19:17 UTC
what does the instruction say @code9ja
your 2 ifs say the same thing @code9ja
if (val > 10) return “Over 10” ; @code9ja
marcus dylan johnson
@mdjohns
Aug 22 2017 19:20 UTC
@sabahatullah /(A-Z0-9-])/g should take care of all of those examples. I’m no expert though. www.regexr.com is my best friend.
Eric
@Zaknefeinn
Aug 22 2017 19:21 UTC
Another Arkansan!
marcus dylan johnson
@mdjohns
Aug 22 2017 19:22 UTC
@Zaknefeinn Represent! Good to see I’m not alone.
@sabahatullah If that doesn’t work, it would help to know in what context you’re needing the RegEx.
Eric
@Zaknefeinn
Aug 22 2017 19:27 UTC
@djohnson501 born and raised!
Stephen James
@sjames1958gm
Aug 22 2017 19:36 UTC
Parents from Conway and Russellville
Eric
@Zaknefeinn
Aug 22 2017 19:46 UTC
@sjames1958gm XD I'm in the Northwest corner
luccifer00
@luccifer00
Aug 22 2017 19:47 UTC
:point_up: 22 de agosto de 2017 19:29 finaly i get it ! @sjames1958gm , i also need to change some divs in HTML, i didnt knew it, how can affect the way we can structure... awsome!, also, i check i need to change some id to class... i dont know why .... it would be for the preference of use querySelectorinstead getElementById , also becouse the ID should be unique? again thanks! i am no tsure i could do it by myself ... alone ...
CamperBot
@camperbot
Aug 22 2017 19:47 UTC
luccifer00 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8366 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Aug 22 2017 19:48 UTC
@luccifer00 querySelector is nice in that it uses similar selectors as CSS
marcus dylan johnson
@mdjohns
Aug 22 2017 19:51 UTC
@Zaknefeinn @sjames1958gm Excellent. I’m in Little Rock, also born and raised.
Kelechi Chinaka
@ke1echi
Aug 22 2017 19:57 UTC
function convert(number) {
  var box = []
  while(number.length > 0) {
    box.push(number.substr(0, 2));
    number = number - 2
  }
  return box
}
why does it run once, what am i not seeing
Jason Luboff
@JLuboff
Aug 22 2017 19:58 UTC
@kelechy numbers don't have a length
Kelechi Chinaka
@ke1echi
Aug 22 2017 19:58 UTC
oh true
Jason Luboff
@JLuboff
Aug 22 2017 19:59 UTC
And if I remember correctly, while loops always run at least once
Kelechi Chinaka
@ke1echi
Aug 22 2017 19:59 UTC
the input is a string "656667"
luccifer00
@luccifer00
Aug 22 2017 20:01 UTC
@sjames1958gm anyways... i was Reading about var= and let= and the let= are not accessible before they are declared in their enclosing block... but we change a lot of things... it means that we can not use the variable set with let? i dont know if i am understanding well...
Kelechi Chinaka
@ke1echi
Aug 22 2017 20:01 UTC
trying to split the string in twos 65 66 67
Guderian Raborg
@hypercuber
Aug 22 2017 20:15 UTC
Can someone help me. How come there is no text appearing with this.click()?
https://codepen.io/hypercuber/pen/xLjozJ?editors=0010
Karol
@nef4r1us
Aug 22 2017 20:25 UTC
@Margaret2 Thank you! Got this e-book already!
CamperBot
@camperbot
Aug 22 2017 20:25 UTC
nef4r1us sends brownie points to @margaret2 :sparkles: :thumbsup: :sparkles:
:star2: 2893 | @margaret2 |http://www.freecodecamp.com/margaret2
marcus dylan johnson
@mdjohns
Aug 22 2017 20:25 UTC
@kelechy I think .split is going to be better for that application than a loop.
Margaret
@Margaret2
Aug 22 2017 20:25 UTC
@nef4r1us :smile: enjoy
Margaret
@Margaret2
Aug 22 2017 20:26 UTC
regex + split, nice :+1:
marcus dylan johnson
@mdjohns
Aug 22 2017 20:27 UTC
var number = “656667”;
number.split(/(..)/).filter(String);
marcus dylan johnson
@mdjohns
Aug 22 2017 21:04 UTC
Working through this return largest numbers in array challenge (https://www.freecodecamp.com/challenges/return-largest-numbers-in-arrays). Anyone able to provide some guidance? Here’s my skeleton so far.

function largestOfFour(arr) {
  var newArr = [];
  for(i = 0; i < arr.length; i++){
       }
       return newArr;
       }


largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);
I’m guessing that I need to use if/else to compare the arr[i][0] and move through things that way?
then push to newArr
Margaret
@Margaret2
Aug 22 2017 21:10 UTC
@djohnson501 you can just sort the arrays (.sort()) and then grab the 1st number from each array for your new array
marcus dylan johnson
@mdjohns
Aug 22 2017 21:21 UTC
@Margaret2 thanks! Any critiques on this solution?

function largestOfFour(arr) {
  var newArr = [];
  for(i = 0; i < arr.length; i++){
       (arr[i].sort(function(a, b){
           return b - a ;
       }));
       newArr.push(arr[i][0]);
       }
        return newArr;
       }


largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);
CamperBot
@camperbot
Aug 22 2017 21:21 UTC
djohnson501 sends brownie points to @margaret2 :sparkles: :thumbsup: :sparkles:
:star2: 2894 | @margaret2 |http://www.freecodecamp.com/margaret2
Ogundele Olumide
@Lumexralph
Aug 22 2017 21:48 UTC
@djohnson501 yes, the idea of using global variable when it's needed for the scope of the for loop
alpox
@alpox
Aug 22 2017 21:53 UTC
@djohnson501 What @Lumexralph is trying to tell you, is that you should introduce the variable i with a keyword (like var or let) because otherwise its a global variable, not bound to the function.
Ronique Ricketts
@RoniqueRicketts
Aug 22 2017 22:07 UTC
if I have a number say 19 is there a way to watch this number for any changes?
alpox
@alpox
Aug 22 2017 22:15 UTC
@RoniqueRicketts A number is a primitive, its only a byte representation. That cannot be watched.
You could argue to watch a variable holding a number, but thats also not directly possible except the variable is not a normal property but a property on an object.
There are ways to "watch" over a thing through the "observable" pattern or similar, which looks a bit different though.
https://github.com/Reactive-Extensions/RxJS is a famous library to bring the observable pattern through streams (Angular makes use of this)
https://github.com/cujojs/most goes a similar way
In general, every time you feel the need for this, you really have to think hard if you really want to "watch" over something because mostly there is a better way for the task you want to do or you can do it simpler than use a fully fledged library
In many cases, you can also use events (Ex. https://www.npmjs.com/package/event-emitter)
luccifer00
@luccifer00
Aug 22 2017 22:21 UTC
anyone know about https://wind-bow.glitch.me/ and how to check if the twitchers are streaming or not??
Ronique Ricketts
@RoniqueRicketts
Aug 22 2017 22:22 UTC
@alpox ok so here is the thing I am working on this https://codepen.io/Ronique/pen/EXMRNB?editors=1011 and I want to ensure that when the computer is going to make a random move It should always have a move.
alpox
@alpox
Aug 22 2017 22:24 UTC
@RoniqueRicketts What do you mean with that it always has a move?
Ronique Ricketts
@RoniqueRicketts
Aug 22 2017 22:25 UTC
@alpox It should always print an X or an O after I make a move
alpox
@alpox
Aug 22 2017 22:25 UTC
@RoniqueRicketts That you can easily do with just doing that sequentially, no?
  1. Choose random
  2. do move
Ronique Ricketts
@RoniqueRicketts
Aug 22 2017 22:26 UTC
@alpox where did I go wrong in the code
alpox
@alpox
Aug 22 2017 22:27 UTC
If you want a random move and go sure that it can go there, you may want to make a list of indices:
[0, 1, 2, 3, 4, 5, 6, 7, 8]
remove the ones which are already taken, so you maybe get [1, 2, 4, 5] as a list of free indices
then you can randomize the index to that array (0-3) and choose the index from the array of free indices
Ronique Ricketts
@RoniqueRicketts
Aug 22 2017 22:27 UTC
@alpox wait a minute I fixed it. :)
alpox
@alpox
Aug 22 2017 22:29 UTC
@RoniqueRicketts I see you do recursion for figuring out a good move :D it might work in this case because there are not so many places to choose from, but be aware that it could potentially blow your stack
Aand there it happened :D
Tab is gone :-/
Ronique Ricketts
@RoniqueRicketts
Aug 22 2017 22:31 UTC
@alpox thanks, Brownie for you. Thanks for starting up the ole brain. :)
CamperBot
@camperbot
Aug 22 2017 22:31 UTC
roniquericketts sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:star2: 1310 | @alpox |http://www.freecodecamp.com/alpox
alpox
@alpox
Aug 22 2017 22:32 UTC

@RoniqueRicketts

console_runner-079c09a0e3b9ff743e39ee2d5637b9216b3545af0de366d4b9aad9dc87e26bfd.js:1 Uncaught RangeError: Maximum call stack size exceeded
at Function.<anonymous> (console_runner-079c09a0e3b9ff743e39ee2d5637b9216b3545af0de366d4b9aad9dc87e26bfd.js:1)
at computerTurn (pen.js:23)
at computerTurn (pen.js:33)
at computerTurn (pen.js:33)
at computerTurn (pen.js:33)
at computerTurn (pen.js:33)
at computerTurn (pen.js:33)
at computerTurn (pen.js:33)
at computerTurn (pen.js:33)
at computerTurn (pen.js:33)

:D
That i call a stack blow ^^
Ronique Ricketts
@RoniqueRicketts
Aug 22 2017 22:33 UTC
@alpox meaning?
alpox
@alpox
Aug 22 2017 22:33 UTC
@RoniqueRicketts Well, thats a stackoverflow - endless recursion
An algorithm which calls itself endlessly because it doesn't find a solution ;-)
That happens with your algorithm because lets say you call computerTurn each time again from itself when it didn't find a free spot, try to find a free spot randomly and have only 1/9 or even 0/9 slots left, it will potentially call itself endlessly
And that raises a stackoverflow (Because the programs stack runs out of memory to keep track of all the calls)
Jason Luboff
@JLuboff
Aug 22 2017 22:39 UTC
@alpox How familar (if at all) are you with Mongodb Aggregate?
DistinctWolf
@DistinctWolf
Aug 22 2017 22:43 UTC
anyone who can help me with bcrypt in nodejs
Ronique Ricketts
@RoniqueRicketts
Aug 22 2017 22:44 UTC
@alpox Oh I understand that. I forgot all about that. ;(
alpox
@alpox
Aug 22 2017 22:45 UTC
@JLuboff I didn't do much with mongodb, sorry :D i'm more used to sql databases
I would probably be able to put some aggregates together, but... depends on the question
Jason Luboff
@JLuboff
Aug 22 2017 22:45 UTC
@alpox No worries. I think I figured out a work around... I'll be getting much more acquinted with MS SQL here soon..
alpox
@alpox
Aug 22 2017 22:46 UTC
@JLuboff :thumbsup:
There you can come to me then :D
Jason Luboff
@JLuboff
Aug 22 2017 22:46 UTC
:D
Ronique Ricketts
@RoniqueRicketts
Aug 22 2017 22:46 UTC
@alpox Its Incomplete, So now that I can get it to put in random numbers, the game will have some break points. It will break for a win or a draw. So that way Uit will not exceed the Maximum call Stack
Jason Luboff
@JLuboff
Aug 22 2017 22:46 UTC
I'm going to be aiming for MCSA Sql 2012/2014 certification...
alpox
@alpox
Aug 22 2017 22:47 UTC
@RoniqueRicketts I before gave you a much sleeker way where you don't even need recursion - :point_up: 23. August 2017 00:27
Maybe you want to give it a shot
Dan Couper
@DanCouper
Aug 22 2017 22:47 UTC
@FlashHero what are you having an issue with? The library only has 6 functions (3 of which are just synchronous versions of the first 3)
alpox
@alpox
Aug 22 2017 22:48 UTC
@JLuboff Oha right a cert :D i don't have one, so i don't really know what they want there... i just work with sql databases for quite some time (Also had classes at university etc.) but i dis use MS SQL only for a short time. I mostly used MySQL and Postgres
I'm not sure how much MSSQL differs from those
DistinctWolf
@DistinctWolf
Aug 22 2017 22:49 UTC
@DanCouper its not hashing password from mongoose schema
do you want to look at the code
Jason Luboff
@JLuboff
Aug 22 2017 22:49 UTC
@alpox MSSQL is syntaxically (I don't think I spelled that correctlly..) similar to MySQL and Oracle SQL, not sure about Postgres. My ultimate goal is to take over the databasing here at my company. I'm giving myself a solid 1-1.5 years to accomplish passing all three tests for the cert
Ronique Ricketts
@RoniqueRicketts
Aug 22 2017 22:50 UTC
@alpox I will do that for the second draft of my project. :smile: I am preparing for beta.freecodecamp.com this specific challenge will be done with ReactJs for beta. so this is just my rough version of the game.
Dan Couper
@DanCouper
Aug 22 2017 22:51 UTC
At what point are you trying to run it? Bcrypt should Just Work, you give the function a string and it hashes, that's it, it doesn't do anything else. Are you getting an error?
alpox
@alpox
Aug 22 2017 22:51 UTC
@JLuboff Hmm Oracle SQL has quite some specialities which surely are not in MSSQL, as well as Postgres does. Its very likely that MSSQL is quite the same as MySQL
@RoniqueRicketts Alright :D
Margaret
@Margaret2
Aug 22 2017 22:51 UTC
@djohnson501 You did a good job! :+1: as far as a way to improve, look up .map(), it's really efficient. for each item in an array, it will do something to it and return a copy of the array. basically eliminates the need for a for loop and a separate array variable. largestOfFour solution using map can be reduced to:
return arr.map(x=>x.sort((a,b)=>b-a)[0])
Jason Luboff
@JLuboff
Aug 22 2017 22:51 UTC
@alpox Ya functionality wise...they maybe quite different, I just know from a prior class that syntax is very similar (SQL) between them
DistinctWolf
@DistinctWolf
Aug 22 2017 22:52 UTC
@DanCouper
var mongoose = require('mongoose'),
    Schema = mongoose.Schema,
    bcrypt = require('bcrypt'),
    SALT_WORK_FACTOR = 10;
UserSchema.pre('save', function(next) {
    var user = this;

if (!user.isModified('password')) return next();

bcrypt.genSalt(SALT_WORK_FACTOR, function(err, salt) {
    if (err) return next(err);
    bcrypt.hash(user.password, salt, function(err, hash) {
        if (err) return next(err);
        user.password = hash;
        next();
    });
});
});
Ronique Ricketts
@RoniqueRicketts
Aug 22 2017 22:52 UTC
@alpox I plan to look at the challenges all over for beta.freecodecamp.com I just wanna rough out all the challenges now so I have an understanding of the rough work then I can go deeper and make it all better.
More coding practice for me.
alpox
@alpox
Aug 22 2017 22:53 UTC
@RoniqueRicketts More practice doesn't hurt :)
Ronique Ricketts
@RoniqueRicketts
Aug 22 2017 22:54 UTC
true. I am gonna complete these last 2 projects and then jump to beta. :) so when It is launch I'd have all of the responsive, data structure and frontend libraries certificate s
alpox
@alpox
Aug 22 2017 22:55 UTC
@Margaret2 Just my 2 cent drop-in (You can ignore me :D) efficient != effective. Efficient would be if the algorithm was fast (map is not), effective if you come easily to your goal with it, so i think effective would be the word :D
DistinctWolf
@DistinctWolf
Aug 22 2017 22:55 UTC

@DanCouper this is the router.js file

router.post('/signup',function(req,res){
    req.checkBody('email','username cannot be empty').notEmpty();
    req.checkBody('email','enter a valid email').isEmail();
            var person=new User({
        email:req.body.email,
        password:req.body.password
    });
    person.save();
});

it saves the user to the database but doesn't hash the password

Margaret
@Margaret2
Aug 22 2017 22:55 UTC
@alpox ah i see, thx for the input
CamperBot
@camperbot
Aug 22 2017 22:55 UTC
margaret2 sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:star2: 1311 | @alpox |http://www.freecodecamp.com/alpox
Dan Couper
@DanCouper
Aug 22 2017 22:57 UTC
@FlashHero I'm not sure why that isn't working, but as the article it's taken from is five years old, possibly check for a newer guide to see if anything in the Mongoose API has changed. Also, just to make sure, does your UserSchema exist?
Ignore last bit, wouldn't save if it wasn't , missed that bit of ur reply
DistinctWolf
@DistinctWolf
Aug 22 2017 22:59 UTC

@DanCouper the schema does exist

var UserSchema = new Schema({
    email: { type: String, required: true},
    password: { type: String, required: true }
});

I don't get any errors but doesn't hash

alpox
@alpox
Aug 22 2017 23:00 UTC
@FlashHero Did you anywhere require the file where you setup the salt generation?
DistinctWolf
@DistinctWolf
Aug 22 2017 23:01 UTC
@alpox yes i did require the file
Stephen James
@sjames1958gm
Aug 22 2017 23:02 UTC
@FlashHero Could the isModified be returning false?
alpox
@alpox
Aug 22 2017 23:04 UTC
Sry, ignore me :D
DistinctWolf
@DistinctWolf
Aug 22 2017 23:04 UTC
@sjames1958gm its not false
Stephen James
@sjames1958gm
Aug 22 2017 23:05 UTC
@FlashHero So you are getting all the way to the user.password = hash line?
alpox
@alpox
Aug 22 2017 23:06 UTC
@FlashHero Did you once set a console.log in there to see if it even enters the encryption?
DistinctWolf
@DistinctWolf
Aug 22 2017 23:07 UTC
@sjames1958gm yes
@alpox where do i do that
alpox
@alpox
Aug 22 2017 23:08 UTC
@FlashHero I mean just console.log("User: ", user); as example, after the user.password = hash line
DistinctWolf
@DistinctWolf
Aug 22 2017 23:08 UTC
ok
alpox
@alpox
Aug 22 2017 23:09 UTC
And then see if you get output
If not, you can put it on all possible levels of computation to see if it gets entered
DistinctWolf
@DistinctWolf
Aug 22 2017 23:11 UTC
I think there's a problem in user because when i console.log user itself it says undefined
alpox
@alpox
Aug 22 2017 23:11 UTC
@FlashHero Oups yes thats a problem :D
DistinctWolf
@DistinctWolf
Aug 22 2017 23:13 UTC
but I don't know what could possibly be wrong in user I think everything seems right
alpox
@alpox
Aug 22 2017 23:13 UTC
@FlashHero Yes, it looks right to me too
DistinctWolf
@DistinctWolf
Aug 22 2017 23:15 UTC
even the this is undefined so i guess that's not how you access the user object
alpox
@alpox
Aug 22 2017 23:15 UTC
@FlashHero According to the references i find... it should be :-/
Where did you log the this? did you log it outside of the hashing functions?
this could be something else inside of the callbacks
DistinctWolf
@DistinctWolf
Aug 22 2017 23:22 UTC
@alpox somehow I was logging the bcrypt in the different file so that's why its undefined but now i checked and tried logging something out no results i think that means that the whole function is not working
alpox
@alpox
Aug 22 2017 23:23 UTC
@FlashHero Where do you require that file?
DistinctWolf
@DistinctWolf
Aug 22 2017 23:23 UTC
I required it in the router.js that's where i have my routes
alpox
@alpox
Aug 22 2017 23:24 UTC
@FlashHero You'd best require it right where you do the schema/model setup. (Probably at the beginning of the startup file, or a require there)
But i don't think thats an issue then
DistinctWolf
@DistinctWolf
Aug 22 2017 23:25 UTC
I tried console logging something out from the UserSchema.pre function but no outputs so that means that the function is not working or what
alpox
@alpox
Aug 22 2017 23:25 UTC
@FlashHero Yes that means that its never called
Can you maybe put a console.log outside of the UserSchema.pre
@FlashHero Oh wait.. i don't know how i missed that - i don't see UserSchema defined at all in the code you showed
DistinctWolf
@DistinctWolf
Aug 22 2017 23:26 UTC
var UserSchema = new Schema({
    email: { type: String, required: true},
    password: { type: String, required: true }
});
alpox
@alpox
Aug 22 2017 23:26 UTC
In the same file?
So that its available
DistinctWolf
@DistinctWolf
Aug 22 2017 23:26 UTC
yes
alpox
@alpox
Aug 22 2017 23:27 UTC
Also, did you create the model User before setting up UserSchema.pre or after?
Slitherings
@Slitherings
Aug 22 2017 23:28 UTC
need help on the Make Object Properties Private
Challenge
so far i have this
DistinctWolf
@DistinctWolf
Aug 22 2017 23:30 UTC
@alpox yes I logged some texts in the function it worked now but this still doesn't work
Slitherings
@Slitherings
Aug 22 2017 23:30 UTC
var Car = function() {
  // this is a private variable
  var speed = 10;

  // these are public methods
  this.accelerate = function(change) {
    speed += change;
  };

  this.decelerate = function() {
    speed -= 5;
  };

  this.getSpeed = function() {
    return speed;
  };
};

var Bike = function(accelerate, decelerate, getSpeed) {

  // Only change code below this line.

};

var myCar = new Car();

var myBike = new Bike();
Please Help haha
@FlashHero sorry for the big text
alpox
@alpox
Aug 22 2017 23:31 UTC
@Slitherings Hmm the bike seems a bit empty :D
@FlashHero Thats pretty weird :-/ i cannot say much without being able to test - but i have to get some sleep now
Slitherings
@Slitherings
Aug 22 2017 23:31 UTC
@alpox yea im not gonna lie its been a few weeks since i've been on this challenge and i have absolutely no idea what 2 do
alpox
@alpox
Aug 22 2017 23:31 UTC
I hope you will figure it out @FlashHero
DistinctWolf
@DistinctWolf
Aug 22 2017 23:32 UTC
@alpox hopefully thanks for the help
@alpox thanks
CamperBot
@camperbot
Aug 22 2017 23:32 UTC
flashhero sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:star2: 1312 | @alpox |http://www.freecodecamp.com/alpox
Jason Luboff
@JLuboff
Aug 22 2017 23:32 UTC
@alpox Not sure if you care or not, but just wanted to show my ugly (and inefficient) aggregate function
db.collection('symbol').aggregate([{$unwind: '$stockData'},
         {$match: {stockData: {$gte: req.params.timeLength, $lte: moment().format('YYYY-MM-DD')}}},
         {$project: {_id: 1, symbol: 1, stockData: 1, color: 1}},
         {$group: {_id: '$_id', 'symbol': {$push: '$symbol'}, "color": {$push: '$color'}, 'stockData': {$push: '$stockData'}}},
         {$project: {symbol: {$arrayElemAt: ['$symbol', 0]}, stockData: 1, color: {$arrayElemAt: ['$color', 0]}}}], (err, doc) => {
DistinctWolf
@DistinctWolf
Aug 22 2017 23:32 UTC
@Slitherings what challenge is that
Slitherings
@Slitherings
Aug 22 2017 23:32 UTC
@FlashHero Make Object Properties Private
alpox
@alpox
Aug 22 2017 23:33 UTC
@Slitherings Hmm as far as i see, the code you showed is the default code for this exercise. It should give you a lineup of what is to do. If you have specific questions about the instructions, i'm sure the people here will be glad to help
Stephen James
@sjames1958gm
Aug 22 2017 23:33 UTC
@Slitherings Add two functions getGear and setGear to the Bike constructor - they will get and set the private variable gear.
use Car and the private variable speed as examples. As well as accelerate and decelerate.
alpox
@alpox
Aug 22 2017 23:33 UTC
@JLuboff Looks... pretty... :D
Jason Luboff
@JLuboff
Aug 22 2017 23:33 UTC
:joy:
Slitherings
@Slitherings
Aug 22 2017 23:35 UTC
Why is javascript so foreign in my mind...
alpox
@alpox
Aug 22 2017 23:36 UTC
@Slitherings If its your first programming language, probably because all programming is foreign to minds at first :D
Slitherings
@Slitherings
Aug 22 2017 23:36 UTC
I can understand all the basics Python, Java and html and stuff
alpox
@alpox
Aug 22 2017 23:36 UTC
@Slitherings Ah, well then its because javascript is pretty... weird :D
That what you do there is like Classes in java or python, but still quite a bit different (Prototyping)
Slitherings
@Slitherings
Aug 22 2017 23:36 UTC
i feel like i had a really good grip of it but i took off for a week and came back and its all gone.
alpox
@alpox
Aug 22 2017 23:37 UTC
The functions like Car or Bike can be seen as class constructors
Keon Samuel
@keonsam
Aug 22 2017 23:37 UTC
@Slitherings how long have you been programming?
Slitherings
@Slitherings
Aug 22 2017 23:37 UTC
this Feburary
alpox
@alpox
Aug 22 2017 23:38 UTC
@JLuboff Such queries are a bit better to do in SQL :D
Slitherings
@Slitherings
Aug 22 2017 23:38 UTC
i was jumping between websites like FreeCodeCamp and CodeAcademy
for a long time, then i started making some friends some websites so i can try to pay for Community College soon.
Keon Samuel
@keonsam
Aug 22 2017 23:38 UTC
and you know Java and Python already?
Jason Luboff
@JLuboff
Aug 22 2017 23:38 UTC
@alpox ehhhhh....I dunno...I much prefer mongo's querying to SQL but I've not had enough practice in either
Slitherings
@Slitherings
Aug 22 2017 23:39 UTC
Python is suppose 2 be really easy right?
DistinctWolf
@DistinctWolf
Aug 22 2017 23:39 UTC
focus on one programming language you'll never get better if you do too many languages at the same time
Slitherings
@Slitherings
Aug 22 2017 23:39 UTC
i know it but i dont really know ways to use it effectively
alpox
@alpox
Aug 22 2017 23:39 UTC
@JLuboff i guess i understand most of what you wrote there in your aggregate, but it looks like SQL would be much easier to read for this .D
DistinctWolf
@DistinctWolf
Aug 22 2017 23:39 UTC
one or two programming languages
Slitherings
@Slitherings
Aug 22 2017 23:39 UTC
@FlashHero yeaaa ik thats why i've been coming back to Javascript becuase i know its used in FrontEnd & BackEnd
alpox
@alpox
Aug 22 2017 23:40 UTC
I'm fully with @FlashHero . Use one language first and stick to it until you feel you know it well
Keon Samuel
@keonsam
Aug 22 2017 23:40 UTC
just learn JS
Slitherings
@Slitherings
Aug 22 2017 23:40 UTC
@alpox how come colleges are still teaching Java instead of Javascript?
DistinctWolf
@DistinctWolf
Aug 22 2017 23:40 UTC
yeah for me node basics was pretty easy because the syntax was basically the same as javascript
Keon Samuel
@keonsam
Aug 22 2017 23:40 UTC
it is taking over all other languages.
alpox
@alpox
Aug 22 2017 23:41 UTC
@Slitherings Because javascript is hated by most academics (i can include myself a bit)
Slitherings
@Slitherings
Aug 22 2017 23:41 UTC
ooo haha so in college you really dont learn much Javascript?
alpox
@alpox
Aug 22 2017 23:41 UTC
Its a language put together in about 10 days at the beginning - without the intention for it to become a widely spread language. Therefore, there didn't go much effort into making it a good and safe language to program in
Slitherings
@Slitherings
Aug 22 2017 23:42 UTC
jeez no wonder its so hard for beginners to learn it
Keon Samuel
@keonsam
Aug 22 2017 23:42 UTC
@alpox so why is it so mainstream now?
alpox
@alpox
Aug 22 2017 23:42 UTC
We did have to use javascript in frontend but only because of the need (Only javascript available there) And still they opted streight for angular 2 without introduction to javascript. Mostly because its OOP
DistinctWolf
@DistinctWolf
Aug 22 2017 23:42 UTC
I don't think they even teach you frontend in college or do they still in high school no idea how college will be
Slitherings
@Slitherings
Aug 22 2017 23:42 UTC
HTML & CSS are baby languages compared to JS
alpox
@alpox
Aug 22 2017 23:43 UTC
@keonsam It is because of the need. No other language runs in browsers. When they noticed that browsers become a big thing (Which they first didn't think), they couldn't crawl back and take a better language for it - too many websites already run on javascript
Also, they couldn't change it much anymore because the existing websites already relied on the functionality it had
@FlashHero They don't. They just once tell you to do this and this in web, with angular 2 and java backend
Most of our people were just thrown into angular 2 frontend without any knowledge of web dev
DistinctWolf
@DistinctWolf
Aug 22 2017 23:45 UTC
even in high schools computer science classes they teach java so that's why i don't want to take those classes currently focusing on node
what's so special about java i don't get it
alpox
@alpox
Aug 22 2017 23:46 UTC
Javascript is mostly a terrible language for academics because it doesn't make about ANY safety guarantees for your program (unless you do), has very weird behaviors in some cases and is a big mix of programming principles
What bugs any academic the most is the point about safety guarantee ;-)
@FlashHero Java is mainstream and is a typesafe OOP language. That gives it the lead for most classes. Also, its quite easy to pick up for newcomers
I myself don't like OOP much, but OOP programming is still what is teach the most at university.
DistinctWolf
@DistinctWolf
Aug 22 2017 23:50 UTC
Yeah I feel bad for those people who had never had any programming experience before going to college struggling without any knowledge of web
alpox
@alpox
Aug 22 2017 23:50 UTC
So, i'm off to bed :D
Slitherings
@Slitherings
Aug 22 2017 23:50 UTC
@alpox if im going to a Community College soon should i just become really good at Java so i have a easy time in class
waittttt :(
DistinctWolf
@DistinctWolf
Aug 22 2017 23:50 UTC
lol
Slitherings
@Slitherings
Aug 22 2017 23:50 UTC
dont leave me :cry:
alpox
@alpox
Aug 22 2017 23:51 UTC
@Slitherings :laughing:
Slitherings
@Slitherings
Aug 22 2017 23:51 UTC
lol haha :D
Stephen James
@sjames1958gm
Aug 22 2017 23:51 UTC
@alpox :sleeping:
Slitherings
@Slitherings
Aug 22 2017 23:51 UTC
its fine if u go 2 bed have a good nights rest haha
wish there was a peace icon like the two fingers up
:wave: there is wave but no peace >.<
alpox
@alpox
Aug 22 2017 23:52 UTC
@Slitherings It depends... not all universities have the same classes and languages :D
Our university just switched from java to python as the main language... I also heard that some teached http://www.scheme.com/tspl4/ in some classes
Keon Samuel
@keonsam
Aug 22 2017 23:52 UTC
isn't community college like close to free?
Slitherings
@Slitherings
Aug 22 2017 23:52 UTC
yeaaa thats why im going soon
alpox
@alpox
Aug 22 2017 23:52 UTC
But AFAIK, OOP is still king at universities -> Python/Java
And C# you could throw in the mix
Keon Samuel
@keonsam
Aug 22 2017 23:53 UTC
OOP?
alpox
@alpox
Aug 22 2017 23:53 UTC
What i also had to use often was C and C++
They are kind of a given sometime
@keonsam Object Oriented Programming
Slitherings
@Slitherings
Aug 22 2017 23:53 UTC
its only costing me 2k for 2 years at the Community College
Hills
@Hillsie
Aug 22 2017 23:53 UTC
I know we have to all start somewhere. Here is a really cool presentation on web technologies and the (r)evolution.
http://blog.isquaredsoftware.com/presentations/2016-10-revolution-of-web-dev/#/0?_k=suqwnb
alpox
@alpox
Aug 22 2017 23:54 UTC
For computer basics, you will surely see some plain C. its the best they can do for the basic principles
So, i really should :D byebye :wave:
Slitherings
@Slitherings
Aug 22 2017 23:55 UTC
bye!! :D
@alpox thanks btw for the help
CamperBot
@camperbot
Aug 22 2017 23:55 UTC
slitherings sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:star2: 1313 | @alpox |http://www.freecodecamp.com/alpox
DistinctWolf
@DistinctWolf
Aug 22 2017 23:55 UTC
@alpox bye good night