These are chat archives for FreeCodeCamp/HelpFrontEnd

2nd
Nov 2017
Daniel Azmitia
@danazm
Nov 02 2017 00:20
@aovsne you definitely need to restructure that as a jsonp request. i ran in to the exact same issue, with many different APIs and they all failed until i did that. check out this write up, it helped me get it working on an API that previously gave me that exact same error: https://www.sitepoint.com/jsonp-examples/
Richard
@rylew0925
Nov 02 2017 01:23
What is the purpose of @charset "utf-8"; ?
Aswin Mohan
@aswinmohanme
Nov 02 2017 01:29
Hey everyone I just started with HTML a while aog
ago*
And I have run into a nasty bug

<!DOCTYPE html>

<html>

<head>
<title>Aswin Mohan</title>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

<link rel="stylesheet" href="css/style.css">
</head>

<body>
<div id="container">
<header>
<nav class="navigation">
<p><a href="#">aswinmohanme@gmail.com</a></p>
</nav>
</header>

<section id="about-me">
<h1>I'm Aswin Mohan</h1>
<p>I <a>Design</a> // <a>Code</a></p>
</section>

<p>and a lot of other stuff that would totally be out of context if I put it here</p>
</div>
</body>

</html>

body {
    margin: 0;
    padding: 0;
    background-color: #ecf0f1;
}

// GLOBALS
#container {
    background-color: red;
    width: 80%;
    height: 100%;
    margin-left: 20%;
    overflow: hidden;
}

header {
    background-color:red;
}
Index.html
<!DOCTYPE html>

<html>

<head>
    <title>Aswin Mohan</title>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <link rel="stylesheet" href="css/style.css">
</head>

<body>
    <div id="container">
        <header>
            <nav class="navigation">
                <p><a href="#">aswinmohanme@gmail.com</a></p>
            </nav>
        </header>

        <section id="about-me">
            <h1>I'm Aswin Mohan</h1>
            <p>I <a>Design</a> // <a>Code</a></p>
        </section>

        <p>and a lot of other stuff that would totally be out of context if I put it here</p>
    </div>
</body>

</html>
The Container is not getting the style, how can I fix this? Sorry for the noise
Tom
@moT01
Nov 02 2017 01:33
is any of the css working?
Aswin Mohan
@aswinmohanme
Nov 02 2017 01:33
Yes the Header is getting the red background
Tested in Chrome and FireFox
Tom
@moT01
Nov 02 2017 01:35
about me section = no red background
?
Aswin Mohan
@aswinmohanme
Nov 02 2017 01:36
I just tried stying it
styling
and it works too
Tom
@moT01
Nov 02 2017 01:36
try removing that comment
i dont think you can comment like that in css
/*css comment*/
Aswin Mohan
@aswinmohanme
Nov 02 2017 01:37
Thanks It works !
Tom
@moT01
Nov 02 2017 01:37
sure thing
Jonathan Albert Cunanan
@jcunanan05
Nov 02 2017 01:49

hello do you always do

* {
   margin: 0px;
   padding: 0px;
}

on css because it has like a initial padding even if you havent done it yet

im trying to build a portfolio page without a css framework and i noticed it has like a margin on the left side and at the top
Tom
@moT01
Nov 02 2017 01:51
the body has some default padding i believe
Randall
@randallwhitlock
Nov 02 2017 01:51
Yeah, doing that removes the built-in browser preformatting that occurs.
Jonathan Albert Cunanan
@jcunanan05
Nov 02 2017 01:54
ok thanks @randallwhitlock
CamperBot
@camperbot
Nov 02 2017 01:54
jcunanan05 sends brownie points to @randallwhitlock :sparkles: :thumbsup: :sparkles:
:cookie: 320 | @randallwhitlock |http://www.freecodecamp.com/randallwhitlock
Jonathan Albert Cunanan
@jcunanan05
Nov 02 2017 01:55
thanks too @moT01
CamperBot
@camperbot
Nov 02 2017 01:55
jcunanan05 sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:cookie: 892 | @mot01 |http://www.freecodecamp.com/mot01
Henry
@GitHub-Henry
Nov 02 2017 01:55
@jcunanan05 there are a few standards for this, reset.css & normalize.css :squirrel:
Jonathan Albert Cunanan
@jcunanan05
Nov 02 2017 02:00
oh thanks @GitHub-Henry it's like the preserved vs stripped styling right?
CamperBot
@camperbot
Nov 02 2017 02:00
jcunanan05 sends brownie points to @github-henry :sparkles: :thumbsup: :sparkles:
:cookie: 446 | @github-henry |http://www.freecodecamp.com/github-henry
Jonathan Albert Cunanan
@jcunanan05
Nov 02 2017 02:00
*default styling
Henry
@GitHub-Henry
Nov 02 2017 02:01
@jcunanan05 The main differences are: Normalize.css preserves useful defaults rather than "unstyling" everything. For example, elements like sup or sub "just work" after including normalize.css (and are actually made more robust) whereas they are visually indistinguishable from normal text after including reset.css.
from google
Jonathan Albert Cunanan
@jcunanan05
Nov 02 2017 02:02
ok thanks i'll take note of that while starting to learn css :)
Aswin Mohan
@aswinmohanme
Nov 02 2017 02:03
<!DOCTYPE html>

<html>

<head>
    <title>Aswin Mohan</title>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <link rel="stylesheet" href="css/style.css">
</head>

<body>
    <div id="container">
        <header>
            <nav class="navigation">
                <p><a href="#">aswinmohanme@gmail.com</a></p>
            </nav>
        </header>

        <section id="about-me">
            <h1>I'm Aswin Mohan</h1>
            <p>I <a>Design</a> // <a>Code</a></p>
        </section>

        <p>and a lot of other stuff that would totally be out of context if I put it here</p>
    </div>
</body>

</html>
I have this html
html {
    height: 100%;
}

body {
    margin: 0;
    padding: 0;
    background-color: #ecf0f1;
    height:100%;
}

/* GLOBALS */
.container {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 80%;
    height:100%;
    padding: 100px 10% 100px 10%;
}

header a{
    text-decoration: none;
    color: #2c3e50;
}

#about-me {
}

#more-me {

}
and this css
The 100% height actually introduces a scrollbar
I just want the container to fill the current viewport only
how do I fix this
Nitin Chandran Nair
@NitinNair89
Nov 02 2017 02:06
Give overflow:hidden to body if you want to hide the scrollbar
@aswinmohanme
Aswin Mohan
@aswinmohanme
Nov 02 2017 02:08
After adding that,the scroll bar goes away
But inspecting it shows that the height of the body is 798
but height of container is 892
Nitin Chandran Nair
@NitinNair89
Nov 02 2017 02:35
Try 100vh
npardon
@npardon
Nov 02 2017 03:02
Hey guys, I finished my tribute page a while back but every now and then I update it. I can never get my footer to stay at the bottom. I have tried using footer tags, a combination of id and class. My footer works fine on my other projects but it just never shows up right on the tribute page. Any help would greatly appreciated. Here is the link:https://codepen.io/npardon/pen/gxaPer
Aswin Mohan
@aswinmohanme
Nov 02 2017 03:08
@NitinNair89 Malayalee Arunnu Alle, Anyway fixed it with ` box-sizing: border-box;
It was the padding which caused the scrollbar
Nitin Chandran Nair
@NitinNair89
Nov 02 2017 03:46
Ok @aswinmohanme
@npardon although this might not be the perfect way but for the time being you can make your footer position: absolute and stick it to bottom
Me
Fabien SHAN
@X140hu4
Nov 02 2017 03:52
@npardon You need more space between your elements. Text is also hard to read, have a read here: https://medium.com/@erikdkennedy/7-rules-for-creating-gorgeous-ui-part-2-430de537ba96 (i recommend reading part1 too, it is very interesting imho :))
@npardon On large screen, the text will take all the horizontal space. It takes a lot of effort if someone want to read because your eyes have to travel a long distance.
Fabien SHAN
@X140hu4
Nov 02 2017 03:58
@npardon If bootstreap is confusing. Have a look at CSS grid and CSS flexbox.
npardon
@npardon
Nov 02 2017 04:08
@NitinNair89 I do have my position as absolute and as I mentioned it works fine on my other pages so I don't get why it is not at the bottom and not show text and elements properly.
Fabien SHAN
@X140hu4
Nov 02 2017 04:10
@npardon position: absolute; is relative to your container (which has correctly the position: relative;) not the page.
You could just have a position:fixed; and bottom: 0;
but that would keep it at the bottom of the screen all the time...
npardon
@npardon
Nov 02 2017 04:18
@X140hu4 thanks
CamperBot
@camperbot
Nov 02 2017 04:18
npardon sends brownie points to @x140hu4 :sparkles: :thumbsup: :sparkles:
:cookie: 309 | @x140hu4 |http://www.freecodecamp.com/x140hu4
Lean Junio
@leanjunio
Nov 02 2017 04:20
Hey guys, can anybody help me with the following??
class Weather {

  init() {
    this.getCurrentLocation();
    console.log(this);
    console.log(this.location);

    // cannot access this.location, returns undefined
  }

  getCurrentLocation() {
    $.getJSON('http://ip-api.com/json', (data) => {
      this.location = data;
    });
  }
}

var w = new Weather();
w.init();
Fabien SHAN
@X140hu4
Nov 02 2017 04:36
@leanjunio Hi, what's your problem?
Lean Junio
@leanjunio
Nov 02 2017 04:36
I can’t access this.location, any ideas?
Long Nguyen
@longnt80
Nov 02 2017 04:43
@leanjunio probably the this keyword is not pointing the correct object
I think you need to declare it in the contructor() and bind(this)
Lean Junio
@leanjunio
Nov 02 2017 04:44
oh okay
I’ll give that a try, thanks!
Nitin Chandran Nair
@NitinNair89
Nov 02 2017 04:45
Why you need this keyword? Can just call that function directly right? Just trying to understand..
Lean Junio
@leanjunio
Nov 02 2017 04:46
I’m trying to make it a bit more complicated so that I can kind of have more familiarity regarding the use of keywords
Long Nguyen
@longnt80
Nov 02 2017 04:48

Can just call that function directly right?

no that function is scoped in the object from the class Weather

Long Nguyen
@longnt80
Nov 02 2017 04:53
@leanjunio
constructor() {
    this.getCurrentLocation = this.getCurrentLocation.bind(this);
  }
Lean Junio
@leanjunio
Nov 02 2017 04:54
Thanks Long, would you mind explaining what’s happening though? I’d really appreciate it
Long Nguyen
@longnt80
Nov 02 2017 04:56
basically, you just declare the function again and bind the this to Weather
so next time you call this.getCurrentLocation, the this always the main object, not the function object that calls it (init())
Long Nguyen
@longnt80
Nov 02 2017 05:02
@leanjunio do you have it on a codepen?
Lean Junio
@leanjunio
Nov 02 2017 05:02
nope, it’s actually just on google chrome
oh okay, so bind ‘binds’ the current object to the parent scope?
Ashwin
@ashwins93
Nov 02 2017 05:11

@leanjunio

var w = new Weather();
w.init();

you are making an ajax request and trying to immediately access the data

that is not how async works
you are trying to access the location before it could find the location
you can only access the location inside the callback of the ajax request
if you try to access it anywhere outside the callback, there is no guarantee if the data would be avaiable
Ashwin
@ashwins93
Nov 02 2017 05:16
The issues is not with the this binding. If you call w.init() then this will only refer to w
Lean Junio
@leanjunio
Nov 02 2017 05:17
does that mean I have to explicitly call w.getCurrentLocation()..?
Long Nguyen
@longnt80
Nov 02 2017 05:19
@leanjunio jquery has a callback method
Ashwin
@ashwins93
Nov 02 2017 05:20
@leanjunio nope, you just need to place your console.log() inside callback
Lean Junio
@leanjunio
Nov 02 2017 05:20
oh okay, i get that
Ashwin
@ashwins93
Nov 02 2017 05:21
class Weather {

  init() {
    this.getCurrentLocation();

    // cannot access this.location, returns undefined
  }

  getCurrentLocation() {
    $.getJSON('http://ip-api.com/json', (data) => {
      this.location = data;
      console.log(this.location);

    });
  }
}

var w = new Weather();
w.init();
Lean Junio
@leanjunio
Nov 02 2017 05:21
but I’m trying to get the response body from the ajax call to be stored into a locl variable
Ashwin
@ashwins93
Nov 02 2017 05:21
yeah it gets stored in the Weather object
but we don't know when exactly it will get stored
you have to "wait" for the data to be stored
Lean Junio
@leanjunio
Nov 02 2017 05:22
oh okay
Ashwin
@ashwins93
Nov 02 2017 05:22
the only guaranteed way to know that is inside the callback
Lean Junio
@leanjunio
Nov 02 2017 05:22
So i need to use promises or something like that..?
Ashwin
@ashwins93
Nov 02 2017 05:22
or through a Promise
Lean Junio
@leanjunio
Nov 02 2017 05:24
oh okay, so you’re saying:
class Weather {

  init() {
    this.getCurrentLocation(); // this actually takes some time
    console.log(this.location) // if I do this right after, there’s still no data in it?
    // cannot access this.location, returns undefined
  }

  getCurrentLocation() {
    $.getJSON('http://ip-api.com/json', (data) => {
      this.location = data;
      console.log(this.location);

    });
  }
}

var w = new Weather();
w.init();
Ashwin
@ashwins93
Nov 02 2017 05:24
perfect
Lean Junio
@leanjunio
Nov 02 2017 05:25
oh okay, I get it, does that work for all functions that have ajax calls in them?
Ashwin
@ashwins93
Nov 02 2017 05:25
the browser executes functions in a fraction of second, so it sends the ajax request and almost simultaneously tries to access the data
Henry
@GitHub-Henry
Nov 02 2017 05:25
@leanjunio console.log(this.location) won't work
Long Nguyen
@longnt80
Nov 02 2017 05:25
@ashwins93 will this work?
class Weather {

  init() {
      $.getJSON('http://ip-api.com/json', (data) => {
      this.getCurrentLocation(data)
    });

  }

  getCurrentLocation(data) {
    this.location = data;
    console.log(this.location);
  }
}
Ashwin
@ashwins93
Nov 02 2017 05:26
@longnt80 yes it will
Henry
@GitHub-Henry
Nov 02 2017 05:26
@leanjunio listen to @longnt80 he's got it right :thumbsup:
Long Nguyen
@longnt80
Nov 02 2017 05:27
thanks @ashwins93 for pointing us to the right direction
CamperBot
@camperbot
Nov 02 2017 05:27
longnt80 sends brownie points to @ashwins93 :sparkles: :thumbsup: :sparkles:
:cookie: 409 | @ashwins93 |http://www.freecodecamp.com/ashwins93
Henry
@GitHub-Henry
Nov 02 2017 05:27
@leanjunio it is because of a thing call asyn functions and call backs
Ashwin
@ashwins93
Nov 02 2017 05:27

@leanjunio console.log(this.location) won't work

it will work as long as you make the call with reference to the object like w.init() because the this gets bound to w and this.location gets translated to w.location

Henry
@GitHub-Henry
Nov 02 2017 05:29
@ashwins93 no it won't, the asyn function will do it's thing, then do the console.log
Ashwin
@ashwins93
Nov 02 2017 05:29
@GitHub-Henry okay it won't work inside the callback
yes
my bad
Lean Junio
@leanjunio
Nov 02 2017 05:30
yeah, i guess that works, but It’s not settling because the api call should ONLY run when I run a getCurrentLocation()…or at least that’s what I’m trying to accomplish.
Henry
@GitHub-Henry
Nov 02 2017 05:30
@ashwins93 no problem
Ashwin
@ashwins93
Nov 02 2017 05:30
previously he had it inside just init()
inside init this will work
inside callback it wont
Henry
@GitHub-Henry
Nov 02 2017 05:30
@leanjunio do it the way @longnt80 showed you how to do it :penguin:
Long Nguyen
@longnt80
Nov 02 2017 05:31
@GitHub-Henry @ashwins93 one question: I don't have to declare this.location upfront?
Henry
@GitHub-Henry
Nov 02 2017 05:32
@longnt80 no you don't
Ashwin
@ashwins93
Nov 02 2017 05:32
@longnt80 never in JS
Lean Junio
@leanjunio
Nov 02 2017 05:32
@ashwins93 is the way that @longnt80 showed the best way to approach such a problem? (no disrespect @longnt80, just trying to fully understand it)
Long Nguyen
@longnt80
Nov 02 2017 05:32
don't worry
Ashwin
@ashwins93
Nov 02 2017 05:33
yeah you need to hard bind @longnt80 is right
i would suggest you to read YDKJS book 3 in order to fully understand this and Objects
Henry
@GitHub-Henry
Nov 02 2017 05:33
@leanjunio the way @longnt80 showed you is a good way, for a beginner, the next step would be to learn promises and do it that way
Lean Junio
@leanjunio
Nov 02 2017 05:34
oh okay, well, thanks guys, will definitely look into it
Long Nguyen
@longnt80
Nov 02 2017 05:34
:+1:
Henry
@GitHub-Henry
Nov 02 2017 05:34
@leanjunio the next step after that is a thing called fetch in my opinion the next step after promises
Lean Junio
@leanjunio
Nov 02 2017 05:35
oh okay, i’ll make sure to look into that as well, thanks man
Henry
@GitHub-Henry
Nov 02 2017 05:35
@leanjunio no problem, there is a lot to learn
Ashwin
@ashwins93
Nov 02 2017 05:35
@longnt80 even in the global scope you could do something like this.name = "hello" without var name and it won't throw any error
it creates a global variable
Long Nguyen
@longnt80
Nov 02 2017 05:36
but not a good practice, right?
Henry
@GitHub-Henry
Nov 02 2017 05:37
@longnt80 right, avoid globals, :shipit:
Long Nguyen
@longnt80
Nov 02 2017 05:37
@GitHub-Henry @ashwins93 @leanjunio thanks guys
CamperBot
@camperbot
Nov 02 2017 05:37
longnt80 sends brownie points to @github-henry and @ashwins93 and @leanjunio :sparkles: :thumbsup: :sparkles:
api offline
:cookie: 293 | @leanjunio |http://www.freecodecamp.com/leanjunio
:cookie: 447 | @github-henry |http://www.freecodecamp.com/github-henry
Ashwin
@ashwins93
Nov 02 2017 05:38
i recently wrote a weird code (just for fun) to reverse arrays which relies on that implicit global scope
var arr = [1, 2, 3];

(this.rev = arr.slice()) && (rev.reverse()) && rev.forEach( i => console.log(i));
this is really a bad programming practice lol
but i just wrote this code to demonstrate how && and this works
running that code on your console will print 3, 2 and 1
Henry
@GitHub-Henry
Nov 02 2017 05:40
@longnt80 no problem, thanks you for the sample code you provided, :shipit: :dizzy:
CamperBot
@camperbot
Nov 02 2017 05:40
github-henry sends brownie points to @longnt80 :sparkles: :thumbsup: :sparkles:
:cookie: 638 | @longnt80 |http://www.freecodecamp.com/longnt80
Henry
@GitHub-Henry
Nov 02 2017 05:43
@ashwins93 thank you for your input as well, :shipit: :dizzy:
CamperBot
@camperbot
Nov 02 2017 05:43
github-henry sends brownie points to @ashwins93 :sparkles: :thumbsup: :sparkles:
:cookie: 410 | @ashwins93 |http://www.freecodecamp.com/ashwins93
Ashwin
@ashwins93
Nov 02 2017 05:43
@GitHub-Henry thank you
Markus Kiili
@Masd925
Nov 02 2017 06:24
@ashwins93 You must be warming up for some code obfuscation contest ;)
Yashu Mittal
@mittalyashu
Nov 02 2017 06:54
I was on this chalange.
Can someone explain me the solution.
Markus Kiili
@Masd925
Nov 02 2017 06:59
@mittalyashu For the actual palindromicality check, you can either reverse the string with array reverse and compare with the original, or use a loop or iterator and compare the first and last characters etc.
heroiczero
@heroiczero
Nov 02 2017 07:01
@mittalyashu you should remove all all non-alphanumeric characters and check if the reverse is the same as the original. You could try using regexp and replace
linkin-park
@linkin-park
Nov 02 2017 07:49

i recently wrote a weird code (just for fun) to reverse arrays which relies on that implicit global scope

var arr = [1, 2, 3];

(this.rev = arr.slice()) && (rev.reverse()) && rev.forEach( i => console.log(i));

i feel this is not weird as weird

@ashwins93
/#$<.
*-[+]
#1/
that was little weird code i wrote
Markus Kiili
@Masd925
Nov 02 2017 08:01
@ashwins93 Just making it hard to read with using redundant parens, thisinsted of window, and && instead of ,.
But good learning excercise, yes.
Ashwin
@ashwins93
Nov 02 2017 08:05
Yeah I know. Like I told it's just for fun
The right way to do it would be to
arr.slice().reverse().forEach( i => console.log(i))
@linkin-park that is asciidots
linkin-park
@linkin-park
Nov 02 2017 08:07
yea
Ashwin
@ashwins93
Nov 02 2017 08:07
I'm involved in its development
linkin-park
@linkin-park
Nov 02 2017 08:07
?
your part of language spec?
or your its implementor
Ashwin
@ashwins93
Nov 02 2017 08:08
no
i'm just involved in that
i'm contributing
linkin-park
@linkin-park
Nov 02 2017 08:08
i see
i like many of its thing
Ashwin
@ashwins93
Nov 02 2017 08:08
we have a chatroom for asciidots
the language was developed by Aaron
he is just 15 year old, very intelligent guy
linkin-park
@linkin-park
Nov 02 2017 08:10
but still i like BF alot :)
@ashwins93 Oh!
is this language era?
tooo many languages
:P @ashwins93
linkin-park
@linkin-park
Nov 02 2017 08:14
if you like to contribute check CJam
@nice @ashwins93
linkin-park
@linkin-park
Nov 02 2017 08:21
i never used ascii dots what all the things we can do with in a smpler way ?
@ashwins93
Ashwin
@ashwins93
Nov 02 2017 08:21
@linkin-park it is still very early in development
you can contribute
if you are willing
its implemented in python
linkin-park
@linkin-park
Nov 02 2017 08:21
i dont know python :(
Ashwin
@ashwins93
Nov 02 2017 08:24
okay
linkin-park
@linkin-park
Nov 02 2017 08:28
at your age i didnt know what to do :) your just great and @Aaron is ever greater kid :) - @ashwins93
BuntyBru
@BuntyBru
Nov 02 2017 10:20
Hi all
Does anyone here indulged in customer support/tech support role?
Tiago Correia
@tiagocorreiaalmeida
Nov 02 2017 10:24
@BuntyBru what do you mean/ what you need help with?
BuntyBru
@BuntyBru
Nov 02 2017 10:26
@tiagocorreiaalmeida
A-J Roos
@Asjas
Nov 02 2017 10:37
@BuntyBru I work in tech support
BuntyBru
@BuntyBru
Nov 02 2017 10:46
@Asjas
messaging you
A-J Roos
@Asjas
Nov 02 2017 10:46
Ok
Nikola
@n1x1
Nov 02 2017 12:03
how many books have you read before putting things in practise and exercise over and over until you feel confident in your knowledge?
kutagullasukumar
@kutagullasukumar
Nov 02 2017 12:16

`// Example
var ourArr = [ 9, 10, 11, 12];
var ourTotal = 0;

for (var i = 0; i < ourArr.length; i++) {
ourTotal += ourArr[i];
}

// Setup
var myArr = [ 2, 3, 4, 5, 6];
var total = 0;
// Only change code below this line

for(var i=0; i < myArr.length; i++){
total += total[i];
}`

Markus Kiili
@Masd925
Nov 02 2017 12:18
@kutagullasukumar You need to add myArr[i] to total.
kutagullasukumar
@kutagullasukumar
Nov 02 2017 12:19
@Masd925 got it thanks mate
CamperBot
@camperbot
Nov 02 2017 12:19
kutagullasukumar sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles:
:star2: 4561 | @masd925 |http://www.freecodecamp.com/masd925
Yashu Mittal
@mittalyashu
Nov 02 2017 12:30
Hi

Join the freecodecamp chat room.

Here are few thing, why you should join freecodecamp chat room.

  1. Unlimited number of people are join.
  2. Create Polls.
  3. Connect the Github/Google/Trello (and many other) acconts.

... and much more.

A-J Roos
@Asjas
Nov 02 2017 12:40
@mittalyashu Freecodecamp uses gitter not flock. We shouldn't break the community into multiple chat apps.
Gitter is already configured for what freecodecamp needs it for
mstellaluna
@mstellaluna
Nov 02 2017 13:12
@mittalyashu Hello, please be aware advertising is against the FCC Code of Conduct https://code-of-conduct.freecodecamp.org/. Please remove your post.
rscales02
@rscales02
Nov 02 2017 13:18
function checkWin(board, team) {
    const winArrays = [
        [0, 1, 2],
        [3, 4, 5],
        [6, 7, 8],
        [0, 3, 6],
        [1, 4, 7],
        [2, 5, 8],
        [0, 4, 8],
        [2, 4, 6]
    ];

    winArrays.forEach( function(element) {
        // statements
        if (board[element[0]] == team && board[element[1]] == team && board[element[2]] == team){
            console.log('hi');
            return true;
        } 
    });
    return false;
}
I am trying to understand why this never returns true... hi will log to the console, but when I use console.log(checkWin(origBoard, team)); from the function I am calling it from it always logs false
shivam gupta
@shivamg11000
Nov 02 2017 13:23
Ashwin
@ashwins93
Nov 02 2017 13:25
@shivamg11000 there are no offset classes in b4
shivam gupta
@shivamg11000
Nov 02 2017 13:26
@ashwins93 then how I am supposed to achieve that
Ashwin
@ashwins93
Nov 02 2017 13:26
@shivamg11000 i'm surprised to find that as well, wait i'm taking a look at the source file
shivam gupta
@shivamg11000
Nov 02 2017 13:27
hmm,
drop bs4
use bs3
Yashu Mittal
@mittalyashu
Nov 02 2017 13:30
@mstellaluna, not buddy. It is not a some kind of advertising. I have been using flock for a long time and it is very awesome tool, that's why I thought of creating a room for freecodecamp too.
mstellaluna
@mstellaluna
Nov 02 2017 13:31
@mittalyashu First, don't call me buddy I'm not your buddy
Yashu Mittal
@mittalyashu
Nov 02 2017 13:31
Sure
:smile:
mstellaluna
@mstellaluna
Nov 02 2017 13:32
and like I said, you can't advert in any of the FCC rooms even though you consider it not an advert
rscales02
@rscales02
Nov 02 2017 13:33
@shivamg11000 the bs4 (documentation)[http://getbootstrap.com/docs/4.0/layout/grid/#offset-classes] shows that there is indeed an offset option...
mstellaluna
@mstellaluna
Nov 02 2017 13:33
@mittalyashu I have no issues with you stating that you create an non-official FCC chat room on a different platform (with a list of advantages)and if anyone is interested you will IM them the link
but not in the room
rscales02
@rscales02
Nov 02 2017 13:33
why they arent working for you... beats me... sorry
shivam gupta
@shivamg11000
Nov 02 2017 13:33
@rscales02 I tried that but it's not working
copied that html
from there
Ashwin
@ashwins93
Nov 02 2017 13:34
@shivamg11000 there seems to offset in their source code
but i think they have not released it yet
rscales02
@rscales02
Nov 02 2017 13:34
yeah I was messing around with that for you... I did notice that you didnt have jquery and the bootstrap js loaded, maybe that has something to do with it?
Ashwin
@ashwins93
Nov 02 2017 13:34
they have some .offset-num classes
but it doesn't seem to have landed on the dist/css
i mean they have a function that creates offset classes
shivam gupta
@shivamg11000
Nov 02 2017 13:35
@rscales02 jquery nowhere used nowdays
A-J Roos
@Asjas
Nov 02 2017 13:36
@shivamg11000 You'll find jQuery is still used. Not everyone has switched to JavaScript 6 or highter
Ashwin
@ashwins93
Nov 02 2017 13:37
okay i found the offset class
its there
shivam gupta
@shivamg11000
Nov 02 2017 13:38
@Asjas Where I was offered job
there was written in the job description
no jquery
rscales02
@rscales02
Nov 02 2017 13:38
" Also note that all plugins depend on jQuery (this means jQuery must be included before the plugin files)" from the getbootstrap.com...
A-J Roos
@Asjas
Nov 02 2017 13:40
@shivamg11000 That is not nowhere. It's a company. I really don't want to start a debate on jQuery. There are entire stackoverflow discussions that you can join to debate it.
Some people might have a use for jQuery. it's up to them
shivam gupta
@shivamg11000
Nov 02 2017 13:40
@Asjas I like jquery, its so easy
but companies don't like it nowdays
A-J Roos
@Asjas
Nov 02 2017 13:41
Okay.
shivam gupta
@shivamg11000
Nov 02 2017 13:43
@rscales02 I have include all
still does not work
Ashwin
@ashwins93
Nov 02 2017 13:49
@shivamg11000 this is the pen? https://codepen.io/shivamg11000/pen/yPBLoM
shivam gupta
@shivamg11000
Nov 02 2017 13:51
@ashwins93 yes
Ashwin
@ashwins93
Nov 02 2017 13:51
@shivamg11000 i replaced your cdnjs link
with maxcdn link
and it works
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css">
instead of this
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-beta/css/bootstrap.min.css" rel="stylesheet">
shivam gupta
@shivamg11000
Nov 02 2017 13:52
@ashwins93 now it works but why?
Ashwin
@ashwins93
Nov 02 2017 13:52
no clue
cdnjs messed up i guess
shivam gupta
@shivamg11000
Nov 02 2017 13:53
there is beta.2 in your link
instead of beta
Ashwin
@ashwins93
Nov 02 2017 13:53
oh yeah
yep adding beta.2 works
A-J Roos
@Asjas
Nov 02 2017 13:53
If you open the cdnjs link and search for offset you'll find one 1 search reply.
The maxcdn returns over 60 results
Ashwin
@ashwins93
Nov 02 2017 13:54
they keep changing the names in every release, from alpha to beta a lot of names changed
i had a tough time keeping up
A-J Roos
@Asjas
Nov 02 2017 13:55
Yeah seems the codepen one is out of date.
shivam gupta
@shivamg11000
Nov 02 2017 13:55
hhm
never try a new version of any langauge/framework before 3 months
A-J Roos
@Asjas
Nov 02 2017 13:56
Yeah bootstrap is changing a lot in BS4. They remove and re-add features in almost every new beta version. They also did it in the alpha versions
Kaz Baig
@kbaig
Nov 02 2017 13:58
Codepen hasn't changed their React cdns either...
Ashwin
@ashwins93
Nov 02 2017 13:59
@kbaig they are using 15.6?
Kaz Baig
@kbaig
Nov 02 2017 14:00
@ashwins93 yeah
Ashwin
@ashwins93
Nov 02 2017 14:00
@Asjas there were 6 alpha versions IIRC
A-J Roos
@Asjas
Nov 02 2017 14:04
I luckily switched over once they hit beta. I knew there were problems. Can't wait for them to finalize BS4
shivam gupta
@shivamg11000
Nov 02 2017 14:07
I think there was some bug in React16
some patch has to come or has come
Ashwin
@ashwins93
Nov 02 2017 14:08
i thought React 16 was a stable release
kutagullasukumar
@kutagullasukumar
Nov 02 2017 14:09

`
//Setup
var contacts = [
{
"firstName": "Akira",
"lastName": "Laine",
"number": "0543236543",
"likes": ["Pizza", "Coding", "Brownie Points"]
},
{
"firstName": "Harry",
"lastName": "Potter",
"number": "0994372684",
"likes": ["Hogwarts", "Magic", "Hagrid"]
},
{
"firstName": "Sherlock",
"lastName": "Holmes",
"number": "0487345643",
"likes": ["Intriguing Cases", "Violin"]
},
{
"firstName": "Kristian",
"lastName": "Vos",
"number": "unknown",
"likes": ["Javascript", "Gaming", "Foxes"]
}
];

function lookUpProfile(firstName, prop){
// Only change code below this line
if(lookUpProfile.hasOwnProperty(firstName) && lookUpProfile.firstName[prop]){
return firstName[prop];
}else if(firstName != lookUpProfile.firstName){
return "No such contact";
}else if(prop != lookUpProperty.firstName[prop]){
return "No such property";
}

// Only change code above this line
}

// Change these values to test your function
lookUpProfile("Akira", "likes");`

where i am going wrong?
A-J Roos
@Asjas
Nov 02 2017 14:13
@kutagullasukumar Can you change it to markdown formatting? To make it easier to read
linkin-park
@linkin-park
Nov 02 2017 14:13
tooooo many frameworks :( going insanely mad
A-J Roos
@Asjas
Nov 02 2017 14:14
@linkin-park Yeah tomorrow there might be even more. Haha
The train never stops
kutagullasukumar
@kutagullasukumar
Nov 02 2017 14:15
@Asjas how to change the format?
A-J Roos
@Asjas
Nov 02 2017 14:16
Use 3 backticks ``` on a newline at the top and bottom
kutagullasukumar
@kutagullasukumar
Nov 02 2017 14:16
//Setup
var contacts = [
    {
        "firstName": "Akira",
        "lastName": "Laine",
        "number": "0543236543",
        "likes": ["Pizza", "Coding", "Brownie Points"]
    },
    {
        "firstName": "Harry",
        "lastName": "Potter",
        "number": "0994372684",
        "likes": ["Hogwarts", "Magic", "Hagrid"]
    },
    {
        "firstName": "Sherlock",
        "lastName": "Holmes",
        "number": "0487345643",
        "likes": ["Intriguing Cases", "Violin"]
    },
    {
        "firstName": "Kristian",
        "lastName": "Vos",
        "number": "unknown",
        "likes": ["Javascript", "Gaming", "Foxes"]
    }
];


function lookUpProfile(firstName, prop){
// Only change code below this line
  if(lookUpProfile.hasOwnProperty(firstName) && lookUpProfile.firstName[prop]){
     return firstName[prop];
     }else if(firstName != lookUpProfile.firstName){
       return "No such contact";
     }else if(prop != lookUpProperty.firstName[prop]){
       return "No such property";
     }

// Only change code above this line
}

// Change these values to test your function
lookUpProfile("Akira", "likes");
yea thanks
Kaz Baig
@kbaig
Nov 02 2017 14:22
npm apparently has 500 new packages every day
so yeah it's not stopping
A-J Roos
@Asjas
Nov 02 2017 14:26
@kbaig the horror
shivam gupta
@shivamg11000
Nov 02 2017 14:30
thinking of releasing my own package
A-J Roos
@Asjas
Nov 02 2017 14:39
@kutagullasukumar A quick problem I found with your code is that you are using lookupProfile inside the if statement. That is the name of the function. You can't use it inside the function
Kaz Baig
@kbaig
Nov 02 2017 14:39
@Asjas hey man if it means better tooling to rise up out of all of that, I'm all for it
Joshua Waller
@Obscureether1
Nov 02 2017 14:40
morning All
linkin-park
@linkin-park
Nov 02 2017 14:41
tooo many frameworks toooo little time
A-J Roos
@Asjas
Nov 02 2017 14:41
@kbaig Yeah I usually hope that whatever someone releases on npm they update. I hate finding a nice project and then it's been discontinued or never updated
kutagullasukumar
@kutagullasukumar
Nov 02 2017 14:41
@Asjas sorry wrong paste
//Setup
var contacts = [
    {
        "firstName": "Akira",
        "lastName": "Laine",
        "number": "0543236543",
        "likes": ["Pizza", "Coding", "Brownie Points"]
    },
    {
        "firstName": "Harry",
        "lastName": "Potter",
        "number": "0994372684",
        "likes": ["Hogwarts", "Magic", "Hagrid"]
    },
    {
        "firstName": "Sherlock",
        "lastName": "Holmes",
        "number": "0487345643",
        "likes": ["Intriguing Cases", "Violin"]
    },
    {
        "firstName": "Kristian",
        "lastName": "Vos",
        "number": "unknown",
        "likes": ["Javascript", "Gaming", "Foxes"]
    }
];


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

// Only change code above this line
}

// Change these values to test your function
lookUpProfile("Akira", "likes");
Kaz Baig
@kbaig
Nov 02 2017 14:41
@Asjas Doesn't hurt to just stay mainstream
Miloslav Voloskov
@uyouthe
Nov 02 2017 14:42
hello!
could anyone please help me with clojurescript?
A-J Roos
@Asjas
Nov 02 2017 14:43
@uyouthe You can post a question and if someone has experience with it they will help you
linkin-park
@linkin-park
Nov 02 2017 14:43
@uyouthe c! dela
A-J Roos
@Asjas
Nov 02 2017 14:46
@kutagullasukumar you can't return lookUpProfile.firstName[prop]. lookUpProfile is the function name.
kutagullasukumar
@kutagullasukumar
Nov 02 2017 14:48
@Asjas changed but not working
A-J Roos
@Asjas
Nov 02 2017 14:48
Also rather test for hasOwnProperty on the prop. Not the firstName
Miloslav Voloskov
@uyouthe
Nov 02 2017 14:48

How do I split namespace to separate files?
I have two different functions in two different files, and I need them both to be in the same namespace.

The namespace is frontend-boilerplate.pages, so I created pages.cljs with the following code:

(ns frontend-boilerplate.pages)

(println hello)

And I have hello.cljs with the following code:

(in-ns frontend-boilerplate.pages)

(defn hello [] (+ 1 2))

When I try to get hello function from the pages.cljs, I get the error. What should I do to use the same namespace across different files?

A-J Roos
@Asjas
Nov 02 2017 14:48
Test the firstName against the name you are given
Miloslav Voloskov
@uyouthe
Nov 02 2017 14:48
SO says that I need to (load "hello"), but it seems like there is no load in clojurescript
linkin-park
@linkin-park
Nov 02 2017 14:48
i have very little time to learn things :'(
A-J Roos
@Asjas
Nov 02 2017 14:49
@linkin-park Why are you posting random sentences?
linkin-park
@linkin-park
Nov 02 2017 14:49
:D @Asjas
yea
kutagullasukumar
@kutagullasukumar
Nov 02 2017 14:49
@Asjas ok i will give another try
linkin-park
@linkin-park
Nov 02 2017 14:49
its cool to do that
A-J Roos
@Asjas
Nov 02 2017 14:51
@kutagullasukumar So basically you test the name. If it exists you move on to test the prop. And then you just have to figure out how to return correctly
kutagullasukumar
@kutagullasukumar
Nov 02 2017 14:52
@Asjas ok
kutagullasukumar
@kutagullasukumar
Nov 02 2017 15:01

@Asjas ```
//Setup
var contacts = [
{
"firstName": "Akira",
"lastName": "Laine",
"number": "0543236543",
"likes": ["Pizza", "Coding", "Brownie Points"]
},
{
"firstName": "Harry",
"lastName": "Potter",
"number": "0994372684",
"likes": ["Hogwarts", "Magic", "Hagrid"]
},
{
"firstName": "Sherlock",
"lastName": "Holmes",
"number": "0487345643",
"likes": ["Intriguing Cases", "Violin"]
},
{
"firstName": "Kristian",
"lastName": "Vos",
"number": "unknown",
"likes": ["Javascript", "Gaming", "Foxes"]
}
];

function lookUpProfile(firstName, prop){
// Only change code below this line

if(firstName == contacts.firstName){
if(prop == contacts.firstName[prop]){
return contacts.firstName[prop];
}
}else
return "No such contact";

for(var i =0; i< prop.length; i++){
if(prop != contact.firstName[prop]){
return "No such property";
}
}
// Only change code above this line
}

// Change these values to test your function
lookUpProfile("Akira", "likes");
```

//Setup
var contacts = [
    {
        "firstName": "Akira",
        "lastName": "Laine",
        "number": "0543236543",
        "likes": ["Pizza", "Coding", "Brownie Points"]
    },
    {
        "firstName": "Harry",
        "lastName": "Potter",
        "number": "0994372684",
        "likes": ["Hogwarts", "Magic", "Hagrid"]
    },
    {
        "firstName": "Sherlock",
        "lastName": "Holmes",
        "number": "0487345643",
        "likes": ["Intriguing Cases", "Violin"]
    },
    {
        "firstName": "Kristian",
        "lastName": "Vos",
        "number": "unknown",
        "likes": ["Javascript", "Gaming", "Foxes"]
    }
];


function lookUpProfile(firstName, prop){
// Only change code below this line

  if(firstName == contacts.firstName){
    if(prop == contacts.firstName[prop]){
      return contacts.firstName[prop];
    }
  }else 
    return "No such contact";

  for(var i =0; i< prop.length; i++){
    if(prop !=  contact.firstName[prop]){
      return "No such property";
    }
  }
// Only change code above this line
}

// Change these values to test your function
lookUpProfile("Akira", "likes");
Joshua Waller
@Obscureether1
Nov 02 2017 15:04
hey all ... sorry but going to ask you for some help. I reached out in the Help room and no one is responding.... Trying to get all of the Mail form to be centered and just cant get it to go ... YES I KNOW it is not finishe yet...
eswhy27
@eswhy27
Nov 02 2017 15:05

Also working on profile lookup...can someone please give me some tips, I feel like I am so close...

for(i=0; i<contacts.length;i++){

if(firstName===contacts[i].firstName){

if (contacts[i].hasOwnProperty(prop)){

  return contacts[i][prop];}

      return "No such contacts";}

        return "No such property";}
Joshua Waller
@Obscureether1
Nov 02 2017 15:09
sorry here is the updated one... system does not like the background i was using https://codepen.io/Obscureether1/pen/XzXmNw
Ronan Souza
@RonnanSouza
Nov 02 2017 15:25
Hey guys, somebody can tell me how can I use a grid system into a card in bootstrap 4?
Like, how to divide in two columns, because I wanna put a pic side by side with a text, inside a card
Miloslav Voloskov
@uyouthe
Nov 02 2017 15:27
@RonnanSouza put the row inside a card and then put columns into that row
Ronan Souza
@RonnanSouza
Nov 02 2017 15:28
@uyouthe but I need to put it into a card-body, or just inside the card div?
Miloslav Voloskov
@uyouthe
Nov 02 2017 15:28
into a card-body would be fine
kutagullasukumar
@kutagullasukumar
Nov 02 2017 15:29
//Setup
var contacts = [
    {
        "firstName": "Akira",
        "lastName": "Laine",
        "number": "0543236543",
        "likes": ["Pizza", "Coding", "Brownie Points"]
    },
    {
        "firstName": "Harry",
        "lastName": "Potter",
        "number": "0994372684",
        "likes": ["Hogwarts", "Magic", "Hagrid"]
    },
    {
        "firstName": "Sherlock",
        "lastName": "Holmes",
        "number": "0487345643",
        "likes": ["Intriguing Cases", "Violin"]
    },
    {
        "firstName": "Kristian",
        "lastName": "Vos",
        "number": "unknown",
        "likes": ["Javascript", "Gaming", "Foxes"]
    }
];


function lookUpProfile(firstName, prop){
// Only change code below this line

  if(firstName == contacts.firstName){
    if(prop == contacts.firstName[prop]){
      return contacts.firstName[prop];
    }
  }else 
    return "No such contact";

  for(var i =0; i< prop.length; i++){
    if(prop !=  contact.firstName[prop]){
      return "No such property";
    }
  }
// Only change code above this line
}

// Change these values to test your function
lookUpProfile("Akira", "likes");
Nikola
@n1x1
Nov 02 2017 15:31
jQuery is a framework for JS right?
kutagullasukumar
@kutagullasukumar
Nov 02 2017 15:32
jQuery is a library built on top of JS
A-J Roos
@Asjas
Nov 02 2017 15:34
@kutagullasukumar Move everything into the for loop. Also loop through the var object not the prop
And then test the firstname against each object in the variable. And then check if it has the correct prop
Sorry I don't want to give you the answer. I'm trying to help you understand what to test for and and what order. Giving you the answer won't help you learn
kutagullasukumar
@kutagullasukumar
Nov 02 2017 15:36
yea thats correct i dont expect answer
np
Nikola
@n1x1
Nov 02 2017 15:37
@kutagullasukumar how to incorporate it in work...link to file as CSS for example?
kutagullasukumar
@kutagullasukumar
Nov 02 2017 15:38
src="file.css"
pass the source of your file in script tags
@n1x1 or you can insert the 'cdn' link in src in script tags
A-J Roos
@Asjas
Nov 02 2017 15:43
@n1x1 Do you mean including jQuery? You can use <script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
Nikola
@n1x1
Nov 02 2017 15:46
@Asjas yeah, but I never used it before so this is my first time dealing with it in code camp school...thanks btw
CamperBot
@camperbot
Nov 02 2017 15:46
n1x1 sends brownie points to @asjas :sparkles: :thumbsup: :sparkles:
:cookie: 264 | @asjas |http://www.freecodecamp.com/asjas
A-J Roos
@Asjas
Nov 02 2017 15:47
No problem :).
If you use codepen you can import it in the settings for the project. So you don't have to manually type it in.
You'll see once you start working with codepen how importing Bootstrap and jQuery works
eswhy27
@eswhy27
Nov 02 2017 15:57
Can someone help me with the profile lookup challenge, not sure where I am returning incorrectly
function lookUpProfile(firstName, prop){
// Only change code below this line
for(i=0;i<contacts.length;i++){
  if(firstName===contacts[i].firstName){
    if(contacts[i].hasOwnProperty){
      return contacts[i][prop];}

    return "No such property";
  }}
  return "No such contact";
Kaz Baig
@kbaig
Nov 02 2017 16:00
@eswhy27 can you link the prob
my bad
Ronan Souza
@RonnanSouza
Nov 02 2017 16:02
thanks @uyouthe
CamperBot
@camperbot
Nov 02 2017 16:02
ronnansouza sends brownie points to @uyouthe :sparkles: :thumbsup: :sparkles:
:cookie: 8 | @uyouthe |http://www.freecodecamp.com/uyouthe
Kaz Baig
@kbaig
Nov 02 2017 16:07
@eswhy27 if (contacts[i].hasOwnProperty) needs to be if (contacts[i].hasOwnProperty(prop))
all objects have the method hasOwnProperty so it always evaluates to true
Chris Rutherford
@cjrutherford
Nov 02 2017 16:09
hey all, having some issues with animations. Would anyone mind helping?
Kaz Baig
@kbaig
Nov 02 2017 16:10
@cjrutherford Post the question and someone will probably get to it :D
Chris Rutherford
@cjrutherford
Nov 02 2017 16:13

okay, I'm working on an animated holiday card, and I'm trying to have an animation run all the time while the page is being viewed. I have the "snow" images loaded in like this:

<div class="snow"><img id="1" src="img/Snow1.png"><img id="2" src="img/Snow2.png"><img id="3" src="img/Snow1.png"><img id="4" src="img/Snow2.png"></div>

and the animations applied like this:

img#1 {
  animation: snow 10s linear 0.1s infinite forwards; }

@keyframes snow {
  0% {
    opacity: 0.5;
    transform: translateY(10px); }
  25% {
    opacity: 1;
    transform: translateY(30px); }
  50% {
    opacity: 0.75;
    transform: translateX(-10px) translateY(60px); }
  75% {
    opacity: 1;
    transform: translateX(20px) translateY(100px); }
  100% {
    opacity: 0.25;
    transform: translateX(0) translateY(120px); } }

but the animations never run

eswhy27
@eswhy27
Nov 02 2017 16:18
@kbaig oops i added that in...i still cannot get the "no such contact" and "no such property" to return correclty
Kaz Baig
@kbaig
Nov 02 2017 16:18
@cjrutherford img #1 as opposed to img#1
@eswhy27 I only changed that and it succeeded for me
eswhy27
@eswhy27
Nov 02 2017 16:19
@kbaig what the heck....
Kaz Baig
@kbaig
Nov 02 2017 16:19
@cjrutherford though if you have an id you you're need img at all, but you can if you want to
Tai Jones
@taiJones00
Nov 02 2017 16:21
How do I achieve the css effect where the full screen is covered by an image when the page loads and then you see more content when you scroll
Isaiah Trembley
@IsaiahCT
Nov 02 2017 16:21
you set a div element to a certain width and height
Kaz Baig
@kbaig
Nov 02 2017 16:22
@taiJones00 set the dimensions of a div to the viewport's dimensions and set that background to your image
Isaiah Trembley
@IsaiahCT
Nov 02 2017 16:22
actually
what do you mean
yesh
@kbaig took the words from my mouth
Kaz Baig
@kbaig
Nov 02 2017 16:23
or I guess if you don't want it to be the background, just do that to the img element itself...
@eswhy27 this is working for me
function lookUpProfile(firstName, prop){
// Only change code below this line
  for (i = 0; i < contacts.length; i++) {

    if (firstName === contacts[i].firstName) {

      if (contacts[i].hasOwnProperty(prop)) {
        return contacts[i][prop];
      }

      return "No such property";  

    }

  }
  return "No such contact";
// Only change code above this line
}
vtarun
@vtarun
Nov 02 2017 16:27
Hi i am trying to implement ngRoute with parameter but i am partial template is not getting loaded
this github link ...https://github.com/vtarun/Burnwal , i asked this question in stackoverflow and for them its working.
rscales02
@rscales02
Nov 02 2017 16:35
function checkTie(board) {
    var reggie = /\d/;
    console.log(board.indexOf(reggie));
}

board = [0, 1, 2, 3, 4, 5, 6, 7, 8];
why does this return -1? shouldn't it log0`
Chris Rutherford
@cjrutherford
Nov 02 2017 16:37
@kbaig yeah I only added the tag name because it wasn't running with just the id...
Kaz Baig
@kbaig
Nov 02 2017 16:38
@cjrutherford could you stick it in a codepen
@rscales02 indexOf doesn't take regular expression
rscales02
@rscales02
Nov 02 2017 16:41
@kbaig that is good to know... thanks!
CamperBot
@camperbot
Nov 02 2017 16:41
rscales02 sends brownie points to @kbaig :sparkles: :thumbsup: :sparkles:
:cookie: 396 | @kbaig |http://www.freecodecamp.com/kbaig
gaitchs gangmei
@gaitchs
Nov 02 2017 17:19
I took a long break
Around java card game now
Jonathan Albert Cunanan
@jcunanan05
Nov 02 2017 17:29
hello do you use cssgrid now? i just heard its good and im just starting to learn css right now
Tiago Correia
@tiagocorreiaalmeida
Nov 02 2017 17:29
I dont think most of the browser supports it at the moment
Jonathan Albert Cunanan
@jcunanan05
Nov 02 2017 17:30
so ill stick to flexbox now?
Tiago Correia
@tiagocorreiaalmeida
Nov 02 2017 17:30
Jonathan Albert Cunanan
@jcunanan05
Nov 02 2017 17:31
ok thanks @tiagocorreiaalmeida !! great help
CamperBot
@camperbot
Nov 02 2017 17:31
jcunanan05 sends brownie points to @tiagocorreiaalmeida :sparkles: :thumbsup: :sparkles:
:cookie: 418 | @tiagocorreiaalmeida |http://www.freecodecamp.com/tiagocorreiaalmeida
Jimmy Van Veen
@JimmayVV
Nov 02 2017 17:32
@jcunanan05 Grid only became adopted in Firefox and Chrome around March of this year. Version 57 of Chrome, and version 52 of Firefox. So support is still primative
@jcunanan05 it's a bummer too! waiting for standards to catch up with us :)
A-J Roos
@Asjas
Nov 02 2017 17:33
Well they're both still better than Internet Explorer XD. Waiting for them is depressing
Jimmy Van Veen
@JimmayVV
Nov 02 2017 17:33
@Asjas absolutely!
Jonathan Albert Cunanan
@jcunanan05
Nov 02 2017 17:36
@JimmayVV ok got it thanks, so i'll stick first to flexbox right haha
CamperBot
@camperbot
Nov 02 2017 17:36
jcunanan05 sends brownie points to @jimmayvv :sparkles: :thumbsup: :sparkles:
:cookie: 305 | @jimmayvv |http://www.freecodecamp.com/jimmayvv
A-J Roos
@Asjas
Nov 02 2017 17:37
I'll start learning css grid once wesbos releases his css grid course. I learned quite a lot about flexbox from him
Jonathan Albert Cunanan
@jcunanan05
Nov 02 2017 17:37
ohhhh ok good thanks @Asjas
CamperBot
@camperbot
Nov 02 2017 17:37
jcunanan05 sends brownie points to @asjas :sparkles: :thumbsup: :sparkles:
:cookie: 265 | @asjas |http://www.freecodecamp.com/asjas
Jonathan Albert Cunanan
@jcunanan05
Nov 02 2017 17:40
how bout animations do you use css animations or stick to javascript? or both? haha
A-J Roos
@Asjas
Nov 02 2017 17:41
@jcunanan05 I've only used css. But I don't do a lot of animations
Tiago Correia
@tiagocorreiaalmeida
Nov 02 2017 17:45
@jcunanan05 css its faster as far as I know
so if possible stick by css
Jonathan Albert Cunanan
@jcunanan05
Nov 02 2017 17:45
got it thanks for the advice @tiagocorreiaalmeida
CamperBot
@camperbot
Nov 02 2017 17:45
jcunanan05 sends brownie points to @tiagocorreiaalmeida :sparkles: :thumbsup: :sparkles:
api offline
Tiago Correia
@tiagocorreiaalmeida
Nov 02 2017 17:45
anytime
that's why people try to avoid js to create the webpage template by using only css
Jonathan Albert Cunanan
@jcunanan05
Nov 02 2017 17:46
oh its like for optimization
that way the page loads faster?
Tiago Correia
@tiagocorreiaalmeida
Nov 02 2017 17:46
one of the many reasons but yeah gl
Chris Rutherford
@cjrutherford
Nov 02 2017 18:10
@kbaig doing that now. was away for a bit
Chris Rutherford
@cjrutherford
Nov 02 2017 18:18
@kbaig here is the pen, but it's not running (NOTE: this is Pug and SASS, use the arrow to show compiled Html and Css)
Kaz Baig
@kbaig
Nov 02 2017 18:19
@cjrutherford no worries I use pug and sass too
@cjrutherford can you remind me what you were trying to do
Chris Rutherford
@cjrutherford
Nov 02 2017 18:20
lol some people freak out when they see it, but it's so easy to type
it's supposed to look like falling snow
Kaz Baig
@kbaig
Nov 02 2017 18:23
@cjrutherford oh mate it's just because you shouldn't name your ids using numbers
change it to letters and it works
Chris Rutherford
@cjrutherford
Nov 02 2017 18:24
Sweet! thanks @kbaig !
CamperBot
@camperbot
Nov 02 2017 18:24
cjrutherford sends brownie points to @kbaig :sparkles: :thumbsup: :sparkles:
:cookie: 397 | @kbaig |http://www.freecodecamp.com/kbaig
Mohamed Nabil Ayoub
@MohNabil
Nov 02 2017 18:42
Hi campers, this url https://api.twitch.tv/kraken/streams/freecodecamp for the twitch app is not working, what is the right api url?
A-J Roos
@Asjas
Nov 02 2017 18:49
@MohNabil It is the correct url. You aren't specifying a api key. Which is why you get a 400 error
Mohamed Nabil Ayoub
@MohNabil
Nov 02 2017 18:49
@Asjas how can i specify an api key?
A-J Roos
@Asjas
Nov 02 2017 18:51
You need a dev twicth account. You then create one. The docs explain how to add your key to the request
Stephen James
@sjames1958gm
Nov 02 2017 18:59
@MohNabil You should try this one it avoids the need for a key.
https://wind-bow.glitch.me/
Mohamed Nabil Ayoub
@MohNabil
Nov 02 2017 19:16
Stephen James
@sjames1958gm
Nov 02 2017 19:25
@MohNabil Hmm, worked for me I got
{
  "stream": null,
  "_links": {
    "self": "https://api.twitch.tv/kraken/streams/freecodecamp",
    "channel": "https://api.twitch.tv/kraken/channels/freecodecamp"
  }
}
Mohamed Nabil Ayoub
@MohNabil
Nov 02 2017 19:27
@sjames1958gm ok i got that also,so when i used console.log didn’t give me anything,so what i use from that response
Stephen James
@sjames1958gm
Nov 02 2017 19:28
@MohNabil Well in this case stream is null so the user is offline.
Mohamed Nabil Ayoub
@MohNabil
Nov 02 2017 19:30
@sjames1958gm if(data.stream == null){
$("#fccStatus").html("Free Code Camp is OFFLINE”); but didn’t show that
Stephen James
@sjames1958gm
Nov 02 2017 19:31
I'd have to see how you are getting data set
Mohamed Nabil Ayoub
@MohNabil
Nov 02 2017 19:31
@sjames1958gm ok it worked with that one
Onome Sotu
@onomesotu
Nov 02 2017 19:33
Hello @sjames1958gm
Stephen James
@sjames1958gm
Nov 02 2017 19:33
@onomesotu :wave:
Onome Sotu
@onomesotu
Nov 02 2017 19:33
Hi there Stephen
How are you today?
Stephen James
@sjames1958gm
Nov 02 2017 19:34
Writing documentation - so I guess ok ;)
Onome Sotu
@onomesotu
Nov 02 2017 19:34
Good. :) I have a challenge, I am trying to set a timeout to show a page loader before an ajax call is sent
This is what i have
function getWeather(e){
        //get the value of the search form
        e.preventDefault();
        var city = $('#search').val();
        openWeatherAPI = 'https://api.openweathermap.org/data/2.5/weather?q=' + city + '&APPID=b24f5a1046585cfcd7ab26e64c0516bc';
        if(city === '')
            $('.city').html('<h2 class="city_error">You forgot to enter a city<h2>');
        else
            var load = '<i class="fa fa-spinner fa-pulse fa-3x fa-fw"></i><span class="sr-only">Loading...</span>';
            setTimeout(function(){
                $('.city').html(load);
            }, 5000);    
            $.getJSON(openWeatherAPI, parseJsonToHtml);
    }
the timeout should show a Font awesome icon page loader before the ajax call is made
but the ajax call is made, the result parsed into html before, the page loader comes on
is there a way round this?
Stephen James
@sjames1958gm
Nov 02 2017 19:37
your code is going to set the spinner after 5 seconds? The AJAX response would be done by then
Onome Sotu
@onomesotu
Nov 02 2017 19:37
LOOOOL
Kaz Baig
@kbaig
Nov 02 2017 19:37
awkward
Onome Sotu
@onomesotu
Nov 02 2017 19:37
oh stupid
sorry... this is a total facepalm moment :worried:
duh..
Stephen James
@sjames1958gm
Nov 02 2017 19:38
@onomesotu We've all been there :)
I call myself dumbass all the time
Onome Sotu
@onomesotu
Nov 02 2017 19:39
loooool.. oh boy.. typical brain fart moment :)
Thanks, I think i can fix this now
Stephen James
@sjames1958gm
Nov 02 2017 19:39
@onomesotu :+1:
Onome Sotu
@onomesotu
Nov 02 2017 19:41
setTimeout(function(){
                $.getJSON(openWeatherAPI, parseJsonToHtml);
            }, 2000);    
            $('.city').html(load);
That is the correct solution
Thanks @sjames1958gm
CamperBot
@camperbot
Nov 02 2017 19:41
onomesotu sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8654 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Lean Junio
@leanjunio
Nov 02 2017 19:51
Does anybody know why the dropdown on smaller sizes does not work ? :/ nav code is directly copied from the bootstrap 4 website https://codepen.io/leanjunio/pen/qVbmJw
Stephen James
@sjames1958gm
Nov 02 2017 20:04
@onomesotu :+1:
Tychro van den Broeke
@tychro
Nov 02 2017 20:22
can anyone help me to get my text inside my div without jumping out of my box????
Tiago Correia
@tiagocorreiaalmeida
Nov 02 2017 20:23
@leanjunio im not sure but try to add bootstrap js
on the codepen and see what happens
@tychro sure but can you show/explain better what you are doing/trying to achive?
Tychro van den Broeke
@tychro
Nov 02 2017 20:24
i need to get some text inside my div, i allready got the text but when i put it in the div it goes way out of the box
good explain? haha
Tiago Correia
@tiagocorreiaalmeida
Nov 02 2017 20:24
is there anyway big word that doesnt break some how?
plus how you defined the width of the box?
cause I see a print of the result and code?
Tychro van den Broeke
@tychro
Nov 02 2017 20:25
pixels
i don't think so, the width is in px, you want the code?
Tiago Correia
@tiagocorreiaalmeida
Nov 02 2017 20:26
that would be enough
and the html for the text part
Tychro van den Broeke
@tychro
Nov 02 2017 20:26
so both, css and html
Tiago Correia
@tiagocorreiaalmeida
Nov 02 2017 20:26
and a resulçt print of what's going wrong
I said cause but I wanted to say can on the message above
Tychro van den Broeke
@tychro
Nov 02 2017 20:27
ohw okay
yeah wait a sec
i can't take a screenshot so is it okay if i just copy it?
Tiago Correia
@tiagocorreiaalmeida
Nov 02 2017 20:29
you can use the window key for screenshot but sure np
Tychro van den Broeke
@tychro
Nov 02 2017 20:29
ooooohw
okay i'll try
im pretty new to this so yeah
Tiago Correia
@tiagocorreiaalmeida
Nov 02 2017 20:30
no worries we are all new to something, just go ahead :)
Tychro van den Broeke
@tychro
Nov 02 2017 20:31

A{

    position: relative;
    width: 1567px;
    height: 100px;
    background-color: rgb(20, 61, 51);
    border: 1px solid black;
    margin-top: 10px;
    margin-right: 0px;
    margin-bottom: 0px;
    margin-left: 0px;
    box-shadow: 0px 5px 10px red;
    text-align: center;
    text-shadow: 5px 5px 10px red;
    text-align: inline;
}
thats my css
<header>
<h1>McLaren</h1>
</header>
<div id="A" class="limit" style="vertical-align: middle;">
<h6><small>
mclaren
mclaren
mclaren
</small></h6>
</div>
<div id="B">
</div> 
<div id="C">
    C
</div>
this is my html
it's about A
Tiago Correia
@tiagocorreiaalmeida
Nov 02 2017 20:32
the last line its wrong if im not mistaken you mean display:inline
oh ok you are not doing the target well on css
to target elements(p/headers/a/divs/others)
you just write element{}
to target classes you do .classname
for ids you do #id
change the above to .limit
and then the styling and will work I guess
Tychro van den Broeke
@tychro
Nov 02 2017 20:33
everything else is working as it should only A doens't work good
Tiago Correia
@tiagocorreiaalmeida
Nov 02 2017 20:34
show me your C style
Tychro van den Broeke
@tychro
Nov 02 2017 20:34
okay wait
Kaz Baig
@kbaig
Nov 02 2017 20:34
@tychro You want #A not just A
Tychro van den Broeke
@tychro
Nov 02 2017 20:35
ohw it didn't copy that but i have that
Tiago Correia
@tiagocorreiaalmeida
Nov 02 2017 20:35
do you know codepen?
place all your code there
and send us the link if possible
Tychro van den Broeke
@tychro
Nov 02 2017 20:36
this is my C style

C{

    width: 779px;
    height: 480px;
    background-color: yellow;
    border: 1px solid black;
    margin-top: 20px;
    margin-right: 0px;
    margin-bottom: 0px;
    margin-left: 1px;
    box-shadow: 0px 5px 10px red;
    color: white;
    background: linear-gradient(to bottom, rgba(102,5,5,1), rgba(102,5,43,1), rgba(102,5,102,1), rgba(63,5,102,1), rgba(63,5,102,1), rgba(102,5,102,1), rgba(102,5,43,1), rgba(102,5,5,1));
    float: right;
}
Kaz Baig
@kbaig
Nov 02 2017 20:36
oh we're not seeing the # because of markdown got it
Tychro van den Broeke
@tychro
Nov 02 2017 20:36
yeah
haha
Kaz Baig
@kbaig
Nov 02 2017 20:36
if you format it as code we can the #
Tychro van den Broeke
@tychro
Nov 02 2017 20:36
the the?
Tiago Correia
@tiagocorreiaalmeida
Nov 02 2017 20:37
he has the # there

c

if he uses it before the letter the chat styles it
do you know codepen?
Tychro van den Broeke
@tychro
Nov 02 2017 20:37
noop
Tiago Correia
@tiagocorreiaalmeida
Nov 02 2017 20:38
look for it and try to set there your project
Kaz Baig
@kbaig
Nov 02 2017 20:38
Tychro van den Broeke
@tychro
Nov 02 2017 20:38
okay
Kaz Baig
@kbaig
Nov 02 2017 20:38
click create
new pen
paste your html/css/js into it
save
and share the link w us
Tychro van den Broeke
@tychro
Nov 02 2017 20:38
okay well wait another sec then hahah
it's an online coding?
Tiago Correia
@tiagocorreiaalmeida
Nov 02 2017 20:39
yeah
Tychro van den Broeke
@tychro
Nov 02 2017 20:40
okay
that link?
i just typed mclaren a few times so you can see what i mean
Tiago Correia
@tiagocorreiaalmeida
Nov 02 2017 20:43
you have an 100px heigh
the text has a sizew bigger than that
if you remove the height
it will work
Kaz Baig
@kbaig
Nov 02 2017 20:44
ta da
Tychro van den Broeke
@tychro
Nov 02 2017 20:44
okay i'll change it
now the box is WAY to big
and the text can't be smaller then h6
Tychro van den Broeke
@tychro
Nov 02 2017 20:49
the text is in de box but the box is way to big if i can't do height
Tiago Correia
@tiagocorreiaalmeida
Nov 02 2017 20:53
how about reduce the text size?
Tychro van den Broeke
@tychro
Nov 02 2017 20:55
hihi how?
Tiago Correia
@tiagocorreiaalmeida
Nov 02 2017 20:56
font-size: 16px
its the standard
then just go higher
unthil what you need :)
Tychro van den Broeke
@tychro
Nov 02 2017 20:57
okay
haha
now my text is to small but then box is precise as i want it to be
Tiago Correia
@tiagocorreiaalmeida
Nov 02 2017 20:58
font-weight:bold;
might help if its nor allready bold
Tychro van den Broeke
@tychro
Nov 02 2017 20:59
k
didn't change anything
got it now
Tychro van den Broeke
@tychro
Nov 02 2017 21:04
thx for the help
Zachary
@Bazill03
Nov 02 2017 22:23
Anyone here pretty good with javascript objects?
Tom
@moT01
Nov 02 2017 22:24
@Bazill03 whats the problem
Zachary
@Bazill03
Nov 02 2017 22:27

I'm trying to find out if something is possible. Say I have a player object for a game:

player: {
    health: 100,
    mana: 100,
    inventory: [],
    travelHistory: [],
    equip: 
  }

and I want to have an object that the player can equip, such as a sword:

    oldSword = {
    name: "old sword",
    stats: Math.floor(Math.random()*(5-1+1)+1)
  },

Why is it that I cannot simply set the equip property of the player object to the stats property of the sword?

player: {
    health: 100,
    mana: 100,
    inventory: [],
    travelHistory: [],
    equip: oldSword.stats
  }
Tom
@moT01
Nov 02 2017 22:30
do you have more code, like how exactly you're setting the variable
how can i try and explain what i think is happening
so when you set a variable to another variable that's an object or array, the variable doesn't have that value - it just points to that value
Zachary
@Bazill03
Nov 02 2017 22:32
Well right now I have a gigantic gamedata array. I can link my codepen.
So is it not possible to set it to that value?
Tom
@moT01
Nov 02 2017 22:32
it's possible, but you have to like clone the object or something
yea, link the pen
shashankbheeshva
@shashankbheeshva
Nov 02 2017 22:33
does .val work ?
Tom
@moT01
Nov 02 2017 22:34
not sure, but i dont think so
.val is jquery right?
Tom
@moT01
Nov 02 2017 22:34
what lines
Zachary
@Bazill03
Nov 02 2017 22:35
10 & 49
Tom
@moT01
Nov 02 2017 22:41
i didnt look at the pen yet
i made this quick
shashankbheeshva
@shashankbheeshva
Nov 02 2017 22:43
@Bazill03 did u get it resolved ?
Tom
@moT01
Nov 02 2017 22:44
does that look kinda like what's going on?
if you can decipher that
Zachary
@Bazill03
Nov 02 2017 22:46
Codepen is showing up empty for me. I am on mobile now though.
Tom
@moT01
Nov 02 2017 22:46
o
not sure how that got copied
Zachary
@Bazill03
Nov 02 2017 22:49
Alright. I’ll take a look.
Tom
@moT01
Nov 02 2017 22:50
i dont see you assigning values in your pen like you said earlier
i see hard coded values
at least on those couple lines
shashankbheeshva
@shashankbheeshva
Nov 02 2017 22:52
Aobjprop: objB.prop; i think he is looking for something like this . isnt it ?
Tom
@moT01
Nov 02 2017 22:55
yea, something like that
maybe im pointing him in the wrong direction
shashankbheeshva
@shashankbheeshva
Nov 02 2017 22:56
i know that in c# we have to create an instance for the obj to get the values of the property, not sure how to do it in javascript. pls do share the solution later
Tom
@moT01
Nov 02 2017 23:10
@Bazill03 any luck?
Morchid Chellali
@Morched23MJ
Nov 02 2017 23:12
I removed the container class from my #playGround div, and the width of left cols on my two rows changed. And I replaced the container class again, when I resized the size of the browser window, something strange happened.
Here is the pen: https://codepen.io/Morched23MJ/pen/zEYxGo
There isn't much code.
Zachary
@Bazill03
Nov 02 2017 23:13
Not yet. Lost track of time and had to leave for work. :/
Tom
@moT01
Nov 02 2017 23:14
nightshift?
@Morched23MJ so what happened
Morchid Chellali
@Morched23MJ
Nov 02 2017 23:16
What you mean? I resized the window to see when to change the size of the title using @media, and the rows didn't stay the way it's supposed to, @moT01
Tom
@moT01
Nov 02 2017 23:18
i gotcha, i didn't resize the window
it seems if you change all the md's to xs's it works
Morchid Chellali
@Morched23MJ
Nov 02 2017 23:23
Owh, let me try
Thank you for your time, I really appreciate your help, @moT01
CamperBot
@camperbot
Nov 02 2017 23:23
morched23mj sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:cookie: 893 | @mot01 |http://www.freecodecamp.com/mot01
Tom
@moT01
Nov 02 2017 23:25
that work?
sure thing
Morchid Chellali
@Morched23MJ
Nov 02 2017 23:26
Yeah, it worked.
shashankbheeshva
@shashankbheeshva
Nov 02 2017 23:27
its the same 12 cells i guess if its lg md or xs atlast ?
ignore me pls
Morchid Chellali
@Morched23MJ
Nov 02 2017 23:29
@shashankbheeshva I don't really know.
@moT01 I tried to remove the class container, trying not to depend on bootstrap, but the width of the two cols changed. Can you try that and see what I mean by that?
Tom
@moT01
Nov 02 2017 23:31
if i remove the container div it gets aligned on the left
but still looks like a square
4 square
whatever
Morchid Chellali
@Morched23MJ
Nov 02 2017 23:33
But the widths changed. I added text-align: center and it stayed that way.
korzo
@korzo
Nov 02 2017 23:34
@Morched23MJ don't use bootstrap for this.
You will fight with it's styles all the time
Morchid Chellali
@Morched23MJ
Nov 02 2017 23:35
So, how could I replace the container styling? @korzo
korzo
@korzo
Nov 02 2017 23:36
@Morched23MJ you don't need container. You overwrote all its styles with #playGround
Morchid Chellali
@Morched23MJ
Nov 02 2017 23:37
So why when I remove the container class, widths change, and it's not as it should be? :l
korzo
@korzo
Nov 02 2017 23:39
@Morched23MJ add padding: 0 15px;
Morchid Chellali
@Morched23MJ
Nov 02 2017 23:40
@korzo, thank you!
CamperBot
@camperbot
Nov 02 2017 23:40
morched23mj sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 722 | @korzo |http://www.freecodecamp.com/korzo
shashankbheeshva
@shashankbheeshva
Nov 02 2017 23:40
id takes precedence on class ?
korzo
@korzo
Nov 02 2017 23:40
@shashankbheeshva yes
shashankbheeshva
@shashankbheeshva
Nov 02 2017 23:41
:+1:
korzo
@korzo
Nov 02 2017 23:42
@shashankbheeshva you need 256 classes to override id
Tom
@moT01
Nov 02 2017 23:42
or 1 !important?
shashankbheeshva
@shashankbheeshva
Nov 02 2017 23:43
256 classes ? whats that , i know !important as Tom said
Tom
@moT01
Nov 02 2017 23:43
a very large number of classes
shashankbheeshva
@shashankbheeshva
Nov 02 2017 23:44
lol like pls can you give me systax sample not the actual 256
<h2 id="first" class="here there should be 256 classes ? "/>
Tom
@moT01
Nov 02 2017 23:45
#myID { color : red; }

.class1 .class2. class3 ...... ...... {
  color: blue;
}
shashankbheeshva
@shashankbheeshva
Nov 02 2017 23:46
got it thanks tom
i appreciate ! :+1:
Tom
@moT01
Nov 02 2017 23:46
there's a hierarchy of css values that i dont quite know how it works, but 1 id must be worth 256 classes
shashankbheeshva
@shashankbheeshva
Nov 02 2017 23:47
looks like quite impossible i havent seen that in any source code, have u @moT01 ?
Tom
@moT01
Nov 02 2017 23:47
css selectors*
korzo
@korzo
Nov 02 2017 23:47
@shashankbheeshva
256, because It's like specificity is calculated
But it's related to class <=> id
If you need to override style defined for id, you can use higher specificity in form tag+id+class
dyon3334
@dyon3334
Nov 02 2017 23:47
can someone tell me why i not get NEGATIVE_INFINITY
console.log(Number.MIN_VALUE-10)
VM546:1 -10
CamperBot
@camperbot
Nov 02 2017 23:47
:bulb: to format code use backticks! ``` more info
korzo
@korzo
Nov 02 2017 23:48
@shashankbheeshva for your example you can use h2#first.class1
Tom
@moT01
Nov 02 2017 23:48
selector values *
Morchid Chellali
@Morched23MJ
Nov 02 2017 23:48
@dyon3334, can you provide the pen you're workin' on?
shashankbheeshva
@shashankbheeshva
Nov 02 2017 23:48
:+1: @korzo
dyon3334
@dyon3334
Nov 02 2017 23:48
@Morched23MJ im just playong around with the console nown