These are chat archives for FreeCodeCamp/Help

16th
Jul 2017
Uriel Guzmán
@Burinson
Jul 16 2017 00:00
I'm trying to use the .length of target as an argument for substr
not sure if that would even work
to get the last characters, according to the .length of the second argument
Serenity
@qmikew1
Jul 16 2017 00:00
yes, you can use length as an argument, and you can use a negative number with that argument
Uriel Guzmán
@Burinson
Jul 16 2017 00:01
hm...
-target.length?
Serenity
@qmikew1
Jul 16 2017 00:02
no
it would be more like blah.length -(n)
or plus or whatever
Uriel Guzmán
@Burinson
Jul 16 2017 00:03
target.length -(target)
?
Serenity
@qmikew1
Jul 16 2017 00:05
what would this tell you console.log(str.substr(str.length -1 ))
Uriel Guzmán
@Burinson
Jul 16 2017 00:06
that the extracted characters would be the number of the first argument's length, minus one?
Wait, no
Serenity
@qmikew1
Jul 16 2017 00:07
str is the first argument but it would tell you maybe the char?
so you could compare that to maybe something else? I dunno
Uriel Guzmán
@Burinson
Jul 16 2017 00:09
function confirmEnding(str, target) {
  // "Never give up and good luck will find you."
  // -- Falcor
  var x = target.length;
  if (target === str.substr(str.length -1)) {
    return true;
  } else {
  return false;
    }
  }


confirmEnding("Bastian", "n");
I'm getting closer
I think
ignore var x
forgot to delete that
Ozan Araz
@haraldur12
Jul 16 2017 00:10
how many charts does it match ?
can the target be longer than 2?
Serenity
@qmikew1
Jul 16 2017 00:10
it's ok, it might be good to step back and just experiment with different things (and then come back)
Ozan Araz
@haraldur12
Jul 16 2017 00:10
seems so
Serenity
@qmikew1
Jul 16 2017 00:11
good point
Uriel Guzmán
@Burinson
Jul 16 2017 00:11
Yes
It can be a whole word
Serenity
@qmikew1
Jul 16 2017 00:11
but I'm trying to sort of get the basics down
Uriel Guzmán
@Burinson
Jul 16 2017 00:11
''the pen is black'', ''black''
Gonna try some stuff
Ozan Araz
@haraldur12
Jul 16 2017 00:11
and it can be the each letter as well right ?
Uriel Guzmán
@Burinson
Jul 16 2017 00:11
yes
Serenity
@qmikew1
Jul 16 2017 00:12
or we can jump ahead lol - go for it
Uriel Guzmán
@Burinson
Jul 16 2017 00:12
I did it
function confirmEnding(str, target) {
  // "Never give up and good luck will find you."
  // -- Falcor

  if (target === str.substr(str.length -target.length)) {
    return true;
  } else {
  return false;
    }
  }


confirmEnding("Bastian", "n");
@qmikew1 thank you for guiding me
CamperBot
@camperbot
Jul 16 2017 00:13
burinson sends brownie points to @qmikew1 :sparkles: :thumbsup: :sparkles:
:star2: 2696 | @qmikew1 |http://www.freecodecamp.com/qmikew1
Serenity
@qmikew1
Jul 16 2017 00:13
np
__mifflin__
@cdrainxv
Jul 16 2017 00:16
@Burinson: Also since you are only returning booleans (either true or false)… you don’t need the if/else blocks. Just this:
return target === str.substr(str.length - target.length);
Ozan Araz
@haraldur12
Jul 16 2017 00:17
I really like one liners
````
Serenity
@qmikew1
Jul 16 2017 00:17
walk before run
Ozan Araz
@haraldur12
Jul 16 2017 00:17
function confirmEnding(str, target) {
 return target === str.substr(str.length -target.length) ? true : false;
}
BrewCoffeeSplash
@BrewCoffeeSplash
Jul 16 2017 00:18
Looking for feedback on my portfolio page, not sure what else to add until i know stuff https://codepen.io/BrewCoffeeSplash/full/dRgVmq/
Kyle Holm
@thekholm80
Jul 16 2017 00:19
return target === str.substr(str.length -target.length) ? true : false; this is an anti-pattern
that's like saying if this is true return true else return false
instead of return the boolean value of this statement
Ozan Araz
@haraldur12
Jul 16 2017 00:22
being a linguist effects me I guess
Kyle Holm
@thekholm80
Jul 16 2017 00:22
:smile: no worries, we all have our own style
Ozan Araz
@haraldur12
Jul 16 2017 00:22
if this is true return true else return false sounds quite verbose but it is not a shorthand for sure
is it something considered as a bad practise ?
Kyle Holm
@thekholm80
Jul 16 2017 00:24
yes, anti-patterns are bad practice
Ozan Araz
@haraldur12
Jul 16 2017 00:24
airbnb preset in my eslint says the samething
when i am coding in react
so i try to avoid it but i still don't get why it is bad
does it cause problems with runtime ?
Gulsvi
@gulsvi
Jul 16 2017 00:25
It's just overly verbose, harder to read, more code to maintain
Kyle Holm
@thekholm80
Jul 16 2017 00:26
my 'one liner' const confirmEnding = (str, target) => target === str[str.length - target.length];
Ozan Araz
@haraldur12
Jul 16 2017 00:26
why it is harder to read if you are telling someone if this is true you are going to be rewarded if this is false you are going to get punished
without such usage imagine 'depending on the statement you will see the consequences'
Kyle Holm
@thekholm80
Jul 16 2017 00:26
oh, that wont work if target is more than a single char lol
oops
Ozan Araz
@haraldur12
Jul 16 2017 00:27
I am just reading about anti patterns in wikipedia
the term was coined in 1995
i wouldn't be surprised if it becomes a bad practise in a few years as well :D
Kyle Holm
@thekholm80
Jul 16 2017 00:27
you won't be surprised if avoiding anti-patterns becomes bad practice?
cdrainxv @cdrainxv : picks nose quizzically
Gulsvi
@gulsvi
Jul 16 2017 00:29

You could do this:

if (5 + 2 === 7) {
  return true;
} else {
  return false;
}

Or just:

return 5 + 2 === 7;
maybe a matter of the better practice will clear up the confusion? :)
__mifflin__
@cdrainxv
Jul 16 2017 00:30
Less bytes and still readable.
Ozan Araz
@haraldur12
Jul 16 2017 00:30
it is not as verbose as the first one
Pagnito
@Pagnito
Jul 16 2017 00:31
who here throughly understand heaps algorithm?
Kyle Holm
@thekholm80
Jul 16 2017 00:32
i'm all about easy to read code, but i'll rarely choose 5 lines of code over 1
Margaret
@Margaret2
Jul 16 2017 01:35

I'm not sure i get the point of this question lol :joy:

Anyone knows how to @ someone quickly in the Gitter app?

just @ them already hahaha
jondygonzales
@jondygonzales
Jul 16 2017 02:15
hello evryone I have an issue regarding of this 'replacing "href" with "#"' Make Dead Links using the Hash Symbol.. https://www.freecodecamp.org/challenges/make-dead-links-using-the-hash-symbol I don't know whats the problem anyone can help please
dhruvjadvani
@dhruvjadvani
Jul 16 2017 02:25
This my tribute page can you please give me suggestions
Nick Ross
@codecampNick
Jul 16 2017 02:25
 <a href="http://www.freecatphotoapp.com”>
should be
Nick Ross
@codecampNick
Jul 16 2017 02:26
 <a href=“#”>
hope that helps @jondygonzales
Hey @dhruvjadvani I think it looks pretty good!
dhruvjadvani
@dhruvjadvani
Jul 16 2017 02:30
10x man
Nick Ross
@codecampNick
Jul 16 2017 02:30
@dhruvjadvani maybe work on some styling? everything is left justifyed
Nothing really wrong with it! :)
jondygonzales
@jondygonzales
Jul 16 2017 02:33
thank you @codecampNick ! its really works
CamperBot
@camperbot
Jul 16 2017 02:33
jondygonzales sends brownie points to @codecampnick :sparkles: :thumbsup: :sparkles:
:cookie: 267 | @codecampnick |http://www.freecodecamp.com/codecampnick
Nick Ross
@codecampNick
Jul 16 2017 02:34
you’re welcome!
BrewCoffeeSplash
@BrewCoffeeSplash
Jul 16 2017 02:39
@dhruvjadvani the image needs to be mobile responsive, other than that looks great
Uriel Guzmán
@Burinson
Jul 16 2017 02:51
@dhruvjadvani I would very strongly suggest to replace img-responsive with img-fluid on your Al Pacino header image, try it and see the magic!
img-fluid will adjust your image no matter the screen size
@dhruvjadvani Also, you should replace width = 1300px with width = 100%
This will also make the image stretch when the screen width gets bigger and always cover the same width, pixels are fixed and if the viewer has a bigger screen, the image will stay the same size
Uriel Guzmán
@Burinson
Jul 16 2017 02:56
aka. white space
sparlkle4000
@sparlkle4000
Jul 16 2017 03:10
Hello! I'm doing the local scope and functions challenge. I want to be sure about something. Anything that I enter inside of the curly brackets is considered to be a part of the function, right?
korzo
@korzo
Jul 16 2017 03:11
@sparlkle4000 Yes. function create own scope
sparlkle4000
@sparlkle4000
Jul 16 2017 03:11
@korzo Thanks
CamperBot
@camperbot
Jul 16 2017 03:11
sparlkle4000 sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 257 | @korzo |http://www.freecodecamp.com/korzo
dhruvjadvani
@dhruvjadvani
Jul 16 2017 03:22
@Burinson hey it's really works...
Thanks for your suggestion @Burinson
CamperBot
@camperbot
Jul 16 2017 03:23
dhruvjadvani sends brownie points to @burinson :sparkles: :thumbsup: :sparkles:
:cookie: 252 | @burinson |http://www.freecodecamp.com/burinson
will
@WillBeatteay
Jul 16 2017 03:26
I am trying to figure out how to solve the Escape Sequences in Strings challenge for basic java this is what I have so far myStr='\FirstLine\nSecondLine\rThirdLine\’; where did I go wrong
korzo
@korzo
Jul 16 2017 03:29
@WillBeatteay I think there shouldn't be \ before F
Joseph
@revisualize
Jul 16 2017 03:29
@WillBeatteay You have to assign 'FirstLine newline backslash SecondLine backslash carriage-return ThirdLine' to the variable myStr.
But, You have to replace the escape words with the proper escape sequences. (And per the instructions: remove all spaces.)
How do you escape a newline?
How do you escape a backslash?
How do you escape a carriage-return?
@WillBeatteay you're not escaping the backslashes in the correct location.
will
@WillBeatteay
Jul 16 2017 03:30
could you show me the proper locations?
sparlkle4000
@sparlkle4000
Jul 16 2017 03:33
@WillBeatteay Look at the example text for this challenge. That will give you can example of where you should escape.
will
@WillBeatteay
Jul 16 2017 03:34
thank you @sparlkle4000 and @revisualize
CamperBot
@camperbot
Jul 16 2017 03:34
willbeatteay sends brownie points to @sparlkle4000 and @revisualize :sparkles: :thumbsup: :sparkles:
:cookie: 174 | @sparlkle4000 |http://www.freecodecamp.com/sparlkle4000
:star2: 4347 | @revisualize |http://www.freecodecamp.com/revisualize
Momozor
@momozor
Jul 16 2017 03:46
heh
heh
heh
heh
Joseph
@revisualize
Jul 16 2017 03:50
@faraco Could you not spam?
mstellaluna
@mstellaluna
Jul 16 2017 03:52
@faraco Hi. Please review our code of conduct at https://www.freecodecamp.org/code-of-conduct/.
Momozor
@momozor
Jul 16 2017 03:56
oh what...oh sorry. I realized when testing my code, the room id is referenced here. pardon me.
Manish Giri
@Manish-Giri
Jul 16 2017 03:57
@thekholm80 ty
CamperBot
@camperbot
Jul 16 2017 03:57
manish-giri sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1341 | @thekholm80 |http://www.freecodecamp.com/thekholm80
Kyle Holm
@thekholm80
Jul 16 2017 03:58
@Manish-Giri no, no thank you
CamperBot
@camperbot
Jul 16 2017 03:58
thekholm80 sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 6262 | @manish-giri |http://www.freecodecamp.com/manish-giri
__mifflin__
@cdrainxv
Jul 16 2017 04:03
^ He doesn’t need even more unnecessary points… He already has more than @camperbot. :cry:
heroiczero
@heroiczero
Jul 16 2017 04:05
@cdrainxv Ill give you a cookie so you can catch up a little thank you :)
CamperBot
@camperbot
Jul 16 2017 04:05
heroiczero sends brownie points to @cdrainxv :sparkles: :thumbsup: :sparkles:
:star2: 2756 | @cdrainxv |http://www.freecodecamp.com/cdrainxv
manish-giri sends brownie points to @cdrainxv :sparkles: :thumbsup: :sparkles:
:star2: 2757 | @cdrainxv |http://www.freecodecamp.com/cdrainxv
Kyle Holm
@thekholm80
Jul 16 2017 04:06
lol
__mifflin__
@cdrainxv
Jul 16 2017 04:07
That’s very kind of you @heroiczero… Thanks from the depths of this cavernous heart.
CamperBot
@camperbot
Jul 16 2017 04:07
cdrainxv sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 1493 | @heroiczero |http://www.freecodecamp.com/heroiczero
Kyle Holm
@thekholm80
Jul 16 2017 04:07
I remember when cookies flowed through this room like a river
lean days ahead
heroiczero
@heroiczero
Jul 16 2017 04:08
yeah probably changed because they moved the chat button into the obscure Setting page
Kyle Holm
@thekholm80
Jul 16 2017 04:08
mern
lol
no need to drag angular into this
__mifflin__
@cdrainxv
Jul 16 2017 04:09

lol, I barely get 1 or 2 cookies a day these days

:not amused:

Kyle Holm
@thekholm80
Jul 16 2017 04:09
so, LAMP is dying according to the same people who say Java is dying
wish i could believe what I read on the interwebs
or if you're in the main room it's "clojure is killing all other languages"
__mifflin__
@cdrainxv
Jul 16 2017 04:11
^^ I heard that it’s Kotlin.
Kyle Holm
@thekholm80
Jul 16 2017 04:12
i wonder if it's like the hipster language? "I was using clojure before it was cool"
I should learn another language. then i can be bad at 2 instead of just one
__mifflin__
@cdrainxv
Jul 16 2017 04:15
I’m never going to bother with those languages… Python, JS, and I’ll probably learn either Java or C(++, #) … and that’s it…
Kyle Holm
@thekholm80
Jul 16 2017 04:17
I'm happy being mediocre at JS for now
teach me
__mifflin__
@cdrainxv
Jul 16 2017 04:19
Yeah… pretty much… Python for fun (and data-visualization/machine learning/ data science), js for browsers (and apps — mobile and desktop)… and the software developement for one of the last three.
I think you have the cases switched around.
Kyle Holm
@thekholm80
Jul 16 2017 04:20
i figured that was intentional to show his mastery of html?
__mifflin__
@cdrainxv
Jul 16 2017 04:21

aesthetically I mean … I don’t believe it makes a difference, but it does to my eyes… it’s like seeing someone using double quotes outside of html…

I actually got that enforced in our style guide… and only 2 spaces instead of 4…. 4 is wayyyy tooooo ugly.

I have seen those as well. It gets crazy if things are just suggested instead of "suggested".
iso
@iso1048
Jul 16 2017 04:34
does anyone know if the comp sci course on khan academy is worth doing?
Joseph
@revisualize
Jul 16 2017 04:42
@gothamknight maybe
@gothamknight what do they cover?
Roseo
@roseoio
Jul 16 2017 04:43
I’m trying to figure out how to scan an object to get back a String, and if the string matches, I want it to pull the first thing from the array stored in the object, and I can’t figure out how to do it. Anyone have an example that could help me understand that better?
Joseph
@revisualize
Jul 16 2017 04:43
@jeranryvoan youre trying to what?
Roseo
@roseoio
Jul 16 2017 04:44
That’s how I’ve felt all night. I have an object, with a property and the property has an array inside. I want to search the object for a certain property and if it exist, pull the first element of the array.
Joseph
@revisualize
Jul 16 2017 04:44
@jeranryvoan .hasOwnProperty()
if (myObj.hasOwnProperty("key")) {
         return myObj["key"][0];
}
Joseph
@revisualize
Jul 16 2017 04:46
@gothamknight Ok?
Roseo
@roseoio
Jul 16 2017 04:48
Thank you. I was trying to make that much harder than that. Yeesh.
Joseph
@revisualize
Jul 16 2017 04:48
if (myObj.hasOwnProperty("key") && typeof myObj["key"] === "array") {
         return myObj["key"][0];
}
@jeranryvoan the typeof may not be correct
@jeranryvoan typeof [1, 2, 4] === 'object';
@gothamknight it looks ok.
__mifflin__
@cdrainxv
Jul 16 2017 04:51
@jeranryvoan: Looks like you already got it, but here’s an example:
function getFirst(key) {
  var obj = {
    names: ['Janice', 'Alice', 'Bernice'],
    ages: [20, 45, 12],
    status: ['divorced', 'married', 'widow']
  };

  return obj.hasOwnProperty(key) ? obj[key][0] : null;
}

getFirst('names'); // 'Janice'
iso
@iso1048
Jul 16 2017 04:52
@revisualize ok. do you recommend other resources to learn compsci?
__mifflin__
@cdrainxv
Jul 16 2017 04:52
@Manish-Giri: 12 year olds can be widows in America, correct? :smile:
Joseph
@revisualize
Jul 16 2017 04:53
@gothamknight I have no idea. I haven;t studied CS
Kyle Holm
@thekholm80
Jul 16 2017 04:54
@gothamknight the edx cs50 course from Harvard is pretty awesome
__mifflin__
@cdrainxv
Jul 16 2017 04:55
@gothamknight: You can also check on github: https://github.com/open-source-society/computer-science
for example… although it’s more extensive.
Darren
@DarrenfJ
Jul 16 2017 04:56
evening fCC
Kyle Holm
@thekholm80
Jul 16 2017 04:56
@DarrenfJ :wave:
Joseph
@revisualize
Jul 16 2017 04:56
@gothamknight I guess it really has to be asked .. What in CS do you want to learn?
Darren
@DarrenfJ
Jul 16 2017 04:56
@thekholm80 hey man :D
Kyle Holm
@thekholm80
Jul 16 2017 04:56
how's canada today?
Darren
@DarrenfJ
Jul 16 2017 04:57
quiet
Kyle Holm
@thekholm80
Jul 16 2017 04:57
must be nice
Darren
@DarrenfJ
Jul 16 2017 04:57
it's just late so nothing's going on
Kyle Holm
@thekholm80
Jul 16 2017 04:58
:grinning:
iso
@iso1048
Jul 16 2017 04:58
@revisualize i think the best thing for me would be an intro, so that I can see what stuff there is to branch into
Kyle Holm
@thekholm80
Jul 16 2017 04:58
oh that reminds me, there's a canadian show i'm supposed to check out
@gothamknight CS50 2016
iso
@iso1048
Jul 16 2017 05:02
@revisualize @thekholm80 @cdrainxv thanks for the help guys.
CamperBot
@camperbot
Jul 16 2017 05:02
gothamknight sends brownie points to @revisualize and @thekholm80 and @cdrainxv :sparkles: :thumbsup: :sparkles:
:star2: 1342 | @thekholm80 |http://www.freecodecamp.com/thekholm80
:star2: 2758 | @cdrainxv |http://www.freecodecamp.com/cdrainxv
:star2: 4348 | @revisualize |http://www.freecodecamp.com/revisualize
@gothamknight but you have to answer the question .. what and why
@gothamknight going down a rabbit hole just to see the bottom only to find dirt is fruitless.
Darren
@DarrenfJ
Jul 16 2017 05:07
@thekholm80 what's the show called?
Kyle Holm
@thekholm80
Jul 16 2017 05:07
@DarrenfJ second city. supposed to have a bunch of famous folks before they got famous
Darren
@DarrenfJ
Jul 16 2017 05:08
hmmm
you mean SCTV?
Kyle Holm
@thekholm80
Jul 16 2017 05:08
yeah, that's it
like Canadian Saturday Night Live
Darren
@DarrenfJ
Jul 16 2017 05:09
@revisualize hey man thanks for the links
CamperBot
@camperbot
Jul 16 2017 05:09
darrenfj sends brownie points to @revisualize :sparkles: :thumbsup: :sparkles:
:star2: 4349 | @revisualize |http://www.freecodecamp.com/revisualize
Darren
@DarrenfJ
Jul 16 2017 05:09
@thekholm80 oh yah it's considered a classic
Kyle Holm
@thekholm80
Jul 16 2017 05:09
i'm hoping i can find somewhere to stream some
oh, they have a youtube channel! that works
Darren
@DarrenfJ
Jul 16 2017 05:11
Kyle Holm
@thekholm80
Jul 16 2017 05:11
that's the one
Darren
@DarrenfJ
Jul 16 2017 05:11
that's probably a good start
Kyle Holm
@thekholm80
Jul 16 2017 05:13
@DarrenfJ thanks for that
CamperBot
@camperbot
Jul 16 2017 05:13
thekholm80 sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 1905 | @darrenfj |http://www.freecodecamp.com/darrenfj
andrea
@girlcodecrush
Jul 16 2017 05:20
Using a codepen, I'm woking on a tribute page. To change a text color, I've typed a code like: <style> h1 {color:black ; } </style>
But didn't work.
Kyle Holm
@thekholm80
Jul 16 2017 05:20
can you give us the link to the codepen?
Kyle Holm
@thekholm80
Jul 16 2017 05:23
@girlcodecrush you should put all your css in the css box, it makes it easier
__mifflin__
@cdrainxv
Jul 16 2017 05:23
@girlcodecrush: It’s because of this: <h1 class="text-primary">… The text-primary class is of higher priority than the h1 element.
andrea
@girlcodecrush
Jul 16 2017 05:24
oh. okay. will do.
Kyle Holm
@thekholm80
Jul 16 2017 05:25
also, you can put all your h1 style in a single selector
h1 {
  font-family:Serif;
  color:black;
}
makes it easier to maintain that way
same with the body css
andrea
@girlcodecrush
Jul 16 2017 05:25
alright
prakash chandra yadav
@prakashyadav008
Jul 16 2017 05:44
hey everyone
has anyone used the google geocoding api
Kamal
@kpbro
Jul 16 2017 05:45
@kpbro
i am stuck on local weather challenge
not getting json data from api
i am first testing here to get json data format from api which should replace 'weather here' text
prakash chandra yadav
@prakashyadav008
Jul 16 2017 05:48
i am having the issue in google reverse geocoding api
can acces the json data
Viktor Tiutiun
@vittorioVT
Jul 16 2017 05:59
@prakashyadav008 you can to use for geolocation: https://ipinfo.io/json
Viktor Tiutiun
@vittorioVT
Jul 16 2017 06:06
@prakashyadav008 you need .html() instead .text() :
$("#temp").html(html1);
$("#weather").html(html2);
also
you should use container divs instead <p>: <div id ="temp"></div>
<div id="weather"></div>...
andrea
@girlcodecrush
Jul 16 2017 06:42
Is there any way to do line spacing? I want to make two-paragraph intro and want to leave a one-line space between the paragraphs.
Viktor Tiutiun
@vittorioVT
Jul 16 2017 06:46
@girlcodecrush line-height: 1.2; or in %, px, em
madhuri soni
@sonimadhuri
Jul 16 2017 06:49
add a <br> tag in the place where you want the next paragraph to begin @girlcodecrush
not sure if i misunderstood the question though
andrea
@girlcodecrush
Jul 16 2017 06:51
oh. thanks. will try.
andrea
@girlcodecrush
Jul 16 2017 07:01
To leave a space(one-line space) before the next paragraph, what code can be used?
Ravi Kishore Thella
@ravikishorethella
Jul 16 2017 07:02
Viktor Tiutiun
@vittorioVT
Jul 16 2017 07:09
@girlcodecrush show your code
zhangfengfeng
@zhangxingkong
Jul 16 2017 07:10
你们好
嗨,在吗
Ene Catalin
@EneCatalin
Jul 16 2017 07:41
cat
Tim Bakker
@ixava
Jul 16 2017 07:49
any php devs here by chance?xD
andrea
@girlcodecrush
Jul 16 2017 07:59
How can I put the text to the right-hand side of the image? I want to know the code for such alignments.
Viktor Tiutiun
@vittorioVT
Jul 16 2017 08:06
@girlcodecrush there are many options, for example: you can to put text in <div class="text">..</div> and in css
.text {
display: block;
margin-right:......; // or margin-left;
}...
you can to use property float for text
sparlkle4000
@sparlkle4000
Jul 16 2017 09:09
Hello! I don't want the answer to this challenge, I'd just like a hint that will possibly get me to think in a different way. I have part of the answer correct but that's not enough. Any tips would be appreciated. :smile:
Pieter Stokkink
@forkerino
Jul 16 2017 09:12
@sparlkle4000 this is a general helproom, you can help us by telling us which challenge you have problems with.
sparlkle4000
@sparlkle4000
Jul 16 2017 09:13
I forgot to mention the challenge...Assignment with a Returned Value
Nevermind!
I got it
Pieter Stokkink
@forkerino
Jul 16 2017 09:14
:+1:
Baruch Kogan
@boriskogan81
Jul 16 2017 10:13
I'm working through the SASS challenges in the Beta version, and having trouble with the very first one. My <style> element looks like this:
<style>

  $text-color: red;

  .header{
    text-align: center;
  }
  .blog-post h2 {
    color: $text-color;
  }
</style>
Viktor Tiutiun
@vittorioVT
Jul 16 2017 10:15
@boriskogan81 you need $textColor don't $text-color
@boriskogan81 camelCase
Baruch Kogan
@boriskogan81
Jul 16 2017 10:16
@vittorioVT That's not working either
here's their example:
$main-fonts: Arial, sans-serif;
$headings-color: green;

//To use variables:
h1 {
  font-family: $main-fonts;
  color: $headings-color;
}
and their assignment is Create a variable $text-color and set it to red. Then change the value of the color property for the .blog-post and h2 to the $text-color variable.
Viktor Tiutiun
@vittorioVT
Jul 16 2017 10:18
@boriskogan81 try refresh your browser and reset again
elad ben aderet
@eladonline
Jul 16 2017 10:20
@boriskogan81 works fine for me
check if you working on preprocessor
of scss
andrea
@girlcodecrush
Jul 16 2017 10:24
@vittorioVT Thanks a million! Btw, don't know properety float, but will search and try to figure it out.
CamperBot
@camperbot
Jul 16 2017 10:24
girlcodecrush sends brownie points to @vittoriovt :sparkles: :thumbsup: :sparkles:
:cookie: 783 | @vittoriovt |http://www.freecodecamp.com/vittoriovt
Pieter Stokkink
@forkerino
Jul 16 2017 10:24
@boriskogan81 It doesn't work for me either. Ubuntu/Chrome
Viktor Tiutiun
@vittorioVT
Jul 16 2017 10:25
@girlcodecrush you're welcome
Baruch Kogan
@boriskogan81
Jul 16 2017 10:45
@forkerino @vittorioVT yeah, I think it's a bug with FCC's setup
Viktor Tiutiun
@vittorioVT
Jul 16 2017 10:49
@boriskogan81 i think you are right becouse in next challenge same answer
rushendra
@rushendrarushi
Jul 16 2017 10:52
can anyone help me with this code

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

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

whats wrong here?
it's challenge number is 172
this is what they have asked for
Write a function nextInLine which takes an array (arr) and a number (item) as arguments. Add the number to the end of the array, then remove the first element of array. The nextInLine function should then return the element that was removed.
andrea
@girlcodecrush
Jul 16 2017 10:54
To align the text of a description of the image to the right-hand side of the page, I used code as shown below. I want the image on the left and the text on the right. The result is the image is shown on the left-hand side of the page, but part of the text is displayed on the right-hand side with the rest text remaining below the image.

<style>
image {
float:left;
}
p {
font-family:monospace;
color:black;
font-size:13px;
font-style:italic;
}

</style>

<p>
<img src="https://cdn.theculturetrip.com/images/56-284004-nam-june-paik-reclining-buddha-copy.jpg" alt="Nam June Paik, Reclining Buddha, 1994/2002. Two-channel video installation with two 9-inch color monitors, reclining stone Buddha, 41.9 x 52.1 x 30.5 cm. Nam June Paik Estate | &#xA9; Ben Blackwell">
TV Buddha(1974), one of his most well-known series, playfully commented on the relationship between technology and human spirituality through a closed-circuit video installation and a bronze Buddha sculpture. The Buddha, sitting opposite the TV, would be looking at his own image on TV, creating an infinite looping of the image and a sense of introspection and self-reflection.
</p>

Viktor Tiutiun
@vittorioVT
Jul 16 2017 10:54
@rushendrarushi var result = arr.shift();
return result;
rushendra
@rushendrarushi
Jul 16 2017 10:54
use div element with classes row and col
Viktor Tiutiun
@vittorioVT
Jul 16 2017 10:55
@rushendrarushi you return an array, and you need a remote element
rushendra
@rushendrarushi
Jul 16 2017 10:56
so i should need a variable?
andrea
@girlcodecrush
Jul 16 2017 10:56
How can I make all the text displayed on the right?
rushendra
@rushendrarushi
Jul 16 2017 10:57
@girlcodecrush can you give a link to your pen?
Viktor Tiutiun
@vittorioVT
Jul 16 2017 10:58
@rushendrarushi you need somewhere to put a remote element
rushendra
@rushendrarushi
Jul 16 2017 10:58

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

var result= arr.shift();

return result(); // Change this line
}

is that correct?
it's throwing an error that it's not a function
Viktor Tiutiun
@vittorioVT
Jul 16 2017 10:59
@rushendrarushi it looks correct
Viktor Tiutiun
@vittorioVT
Jul 16 2017 11:00
@rushendrarushi return result;
rushendra
@rushendrarushi
Jul 16 2017 11:00
shit
@vittorioVT thanks man
CamperBot
@camperbot
Jul 16 2017 11:00
rushendrarushi sends brownie points to @vittoriovt :sparkles: :thumbsup: :sparkles:
:cookie: 784 | @vittoriovt |http://www.freecodecamp.com/vittoriovt
Viktor Tiutiun
@vittorioVT
Jul 16 2017 11:01
@rushendrarushi welcome
rushendra
@rushendrarushi
Jul 16 2017 11:01
@girlcodecrush what do you want to do now?
andrea
@girlcodecrush
Jul 16 2017 11:02
want to align the image on the left-hand side of the page and the text on the right-hand side.
rushendra
@rushendrarushi
Jul 16 2017 11:02
all the text? @girlcodecrush
andrea
@girlcodecrush
Jul 16 2017 11:02
the description of the image on the right side with the image on the left
rushendra
@rushendrarushi
Jul 16 2017 11:03
ok
let me see
andrea
@girlcodecrush
Jul 16 2017 11:03

<style>
image {
float:left;
}
p {
display:block;
margin-left;
}
p {
font-family:monospace;
color:black;
font-size:13px;
font-style:italic;
}

</style>

<p>
<img src="https://cdn.theculturetrip.com/images/56-284004-nam-june-paik-reclining-buddha-copy.jpg" alt="Nam June Paik, Reclining Buddha, 1994/2002. Two-channel video installation with two 9-inch color monitors, reclining stone Buddha, 41.9 x 52.1 x 30.5 cm. Nam June Paik Estate | &#xA9; Ben Blackwell">
TV Buddha(1974), one of his most well-known series, playfully commented on the relationship between technology and human spirituality through a closed-circuit video installation and a bronze Buddha sculpture. The Buddha, sitting opposite the TV, would be looking at his own image on TV, creating an infinite looping of the image and a sense of introspection and self-reflection.
</p>

rushendra
@rushendrarushi
Jul 16 2017 11:04
first put your style element on css
andrea
@girlcodecrush
Jul 16 2017 11:04
the above is the code I used. but it came out with the image on the left and only a part of the text(description of the image) displayed on the right and
the rest text still remains below the image.
rushendra
@rushendrarushi
Jul 16 2017 11:05
@girlcodecrush oh my god you have a mess in your code you need to put all the styling elements on css tab
and add bootstrap to css
Baruch Kogan
@boriskogan81
Jul 16 2017 11:12
I'm getting an error in this SASS mixin on codepen:
@mixin border-stroke ($val) {
  @if $val == light { border: 1px solid black }
  @else if  $val == medium{ border: 3px solid black}
  @else if $val == heavy{border: 6px solid black}
  @else {border: none}
  }

  #box {
    width: 150px;
    height: 150px;
    background-color: red;
    @include border-stroke(medium);
  }
error says: Invalid CSS after "($val)": expected expression (e.g. 1px, bold,) was "{"
seems to work when I use SCSS as a preprocessor, but not SASS
any idea why?
Ala Pota
@alapota
Jul 16 2017 11:20
Thank you @Takumar it works now well
CamperBot
@camperbot
Jul 16 2017 11:20
alapota sends brownie points to @takumar :sparkles: :thumbsup: :sparkles:
:star2: 3775 | @takumar |http://www.freecodecamp.com/takumar
AmirHamzaTanvir
@AmirHamzaTanvir
Jul 16 2017 11:43
(shift+enter for line break) function chunkArrayInGroups(arr, size) { var firstArr = []; for (i = 0; i == size; i++){ firstArr.push(arr[i]); } return firstArr; }
var code = function chunkArrayInGroups(arr, size) {
  var firstArr = [];
  for (i = 0; i == size; i++){
    firstArr.push(arr[i]);
  }
  return firstArr;
}
code is not pussing
pushing lol
Viktor Tiutiun
@vittorioVT
Jul 16 2017 11:44
@AmirHamzaTanvir i<arr.length don't i==size
AmirHamzaTanvir
@AmirHamzaTanvir
Jul 16 2017 11:45
thanks
still doesnt push
im trying to push one element at a time into firstArr
Ahmed Tarek
@ahmedtarek2134
Jul 16 2017 11:46
var i = 0 not i = 0
like this i is undefined
Aleksander Gębicki
@Takumar
Jul 16 2017 11:50
@AmirHamzaTanvir with i == size you compare i variable with size variable (not existing).
you should check if i is less then number of elements of array.
Try to put i < arr.length instead
Viktor Tiutiun
@vittorioVT
Jul 16 2017 11:59
@AmirHamzaTanvir you need another variable, which will determine the length of your array : var x = arr.length/size;
@AmirHamzaTanvir then for ( var i = 0; i < x; i++) { ...}
AmirHamzaTanvir
@AmirHamzaTanvir
Jul 16 2017 12:02
@vittorioVT @Takumar thanks guys
CamperBot
@camperbot
Jul 16 2017 12:02
amirhamzatanvir sends brownie points to @vittoriovt and @takumar :sparkles: :thumbsup: :sparkles:
:cookie: 785 | @vittoriovt |http://www.freecodecamp.com/vittoriovt
:star2: 3776 | @takumar |http://www.freecodecamp.com/takumar
Viktor Tiutiun
@vittorioVT
Jul 16 2017 12:04
@AmirHamzaTanvir you need to use also arr.splice(0, size) and then push()
Neringa
@Nerinqute
Jul 16 2017 12:04
Hello is there someone who knows how to make background color for form element? i know the code but can't figure out where should it be
Aleksander Gębicki
@Takumar
Jul 16 2017 12:06

@Nerinqute you can try to create CSS rule for form:

<style>
  form {
    background...
  }
</style>

But better would be to create ID for this selected form and create rule for that ID with background color. Later you use that ID for form: <form id="your_ID">

Viktor Tiutiun
@vittorioVT
Jul 16 2017 12:09
@Nerinqute just add class <form class="bg"> and in css give it value
Neringa
@Nerinqute
Jul 16 2017 12:12
Thank you so much I will try :)
Sydney
@SydneyWarren
Jul 16 2017 12:28
have a quick question when i'm doing a call using this https://wind-bow.gomix.me/twitch-api
whats the complete syntax i use to get back everything from freecodecamp page on twitch tv?
Sydney
@SydneyWarren
Jul 16 2017 12:39
is anyone in this room?
shivam gupta
@shivamg11000
Jul 16 2017 12:39
@SydneyWarren
I did't get what you are talking about
Sydney
@SydneyWarren
Jul 16 2017 12:41
i'm trying to use the twitch API... uuhmmm the get function, so it returns data to me
shivam gupta
@shivamg11000
Jul 16 2017 12:41
@SydneyWarren yeah
and you are facing what issue
Sydney
@SydneyWarren
Jul 16 2017 12:42
i dont know what to add to https://wind-bow.gomix.me/twitch-api this, so i can get the data i need for free code camps page
shivam gupta
@shivamg11000
Jul 16 2017 12:43
@SydneyWarren well I can't say anything as I use the the original twichtv api
Sydney
@SydneyWarren
Jul 16 2017 12:43
oh ok thx
shivam gupta
@shivamg11000
Jul 16 2017 12:47
@SydneyWarren well you read this https://wind-bow.glitch.me/
you have to add
channels/[channel_name]
or
users/[user_name]
to the api end point
cowCrazy
@cowCrazy
Jul 16 2017 12:49
@shivamg11000 does a cors
shivam gupta
@shivamg11000
Jul 16 2017 12:50
@cowCrazy
?
you are using what method to load json
cowCrazy
@cowCrazy
Jul 16 2017 12:51
@shivamg11000 does a cors required for this api? If yes @SydneyWarren should alsk add 'https://cors-anywhere.herokuapp.com/' before the api-url
shivam gupta
@shivamg11000
Jul 16 2017 12:51
@cowCrazy well if data is loaded with
$.getJSON
then a callback will solve the issue
@SydneyWarren
Sydney
@SydneyWarren
Jul 16 2017 12:52
what is a callback again?
shivam gupta
@shivamg11000
Jul 16 2017 12:53
?callback=?
@SydneyWarren
cowCrazy
@cowCrazy
Jul 16 2017 12:53
@shivamg11000 ok, I'll check it later, thanks
CamperBot
@camperbot
Jul 16 2017 12:53
:cookie: 395 | @shivamg11000 |http://www.freecodecamp.com/shivamg11000
cowcrazy sends brownie points to @shivamg11000 :sparkles: :thumbsup: :sparkles:
@SydneyWarren what you are using to fetch data
$.getJSON vs $.ajax vs XMLHttpRequest ?
Sydney
@SydneyWarren
Jul 16 2017 13:04
.getJson
so is that what i put in the callback? @shivamg11000
shivam gupta
@shivamg11000
Jul 16 2017 13:05
@SydneyWarren put callback at the last to recieve the data in jsonp to solve/bypass the issue of cors
Sydney
@SydneyWarren
Jul 16 2017 13:06
this is what i put in not getting what i want back
shivam gupta
@shivamg11000
Jul 16 2017 13:06
@SydneyWarren nope
see the pen I sent
Sydney
@SydneyWarren
Jul 16 2017 13:07
looking at it right now
whats the difference between let and var?
shivam gupta
@shivamg11000
Jul 16 2017 13:09
var is old and error prone and let is new
you can use var
until you learn es6
Sydney
@SydneyWarren
Jul 16 2017 13:09
ok thanks @shivamg11000
CamperBot
@camperbot
Jul 16 2017 13:09
sydneywarren sends brownie points to @shivamg11000 :sparkles: :thumbsup: :sparkles:
:cookie: 396 | @shivamg11000 |http://www.freecodecamp.com/shivamg11000
shivam gupta
@shivamg11000
Jul 16 2017 13:09
@SydneyWarren Both are same just there is a difference in hoisting
ajdev27
@ajdev27
Jul 16 2017 13:11
    for (var i = 0; i < arr.length; i++) {
      for(var j = 0; j < arr[i].length; j++) {
        product = product * arr[i][j];
      }
    }
can someone explain to me what this code is doing exactly?
im trying to understand it 100%
Ene Catalin
@EneCatalin
Jul 16 2017 13:14
in that array you have numbers
this way you pretty much get the total * of all of them
mult
since you start with 0 0 (first nr)
then go 0 1 and so on
you pretty much take them all
or that's what I think at least
ajdev27
@ajdev27
Jul 16 2017 13:15
explain to me "00" and "01"
CamperBot
@camperbot
Jul 16 2017 13:15

freeCodeCamp Wiki:

:point_right: The freeCodeCamp wiki can be found on our forum.
Please follow the link and search there.
ajdev27
@ajdev27
Jul 16 2017 13:15
sorry im a slow learner when it comes to JS
Ene Catalin
@EneCatalin
Jul 16 2017 13:15
it's a multi dim array
Krishna Biradar
@kr5hn4
Jul 16 2017 13:16
@ajdev27 it looks like its looping through an array of arrays and then mutating the product value;
Ene Catalin
@EneCatalin
Jul 16 2017 13:16
0 is the first position
so 0 0 first row first column element
ajdev27
@ajdev27
Jul 16 2017 13:16
oh
Ene Catalin
@EneCatalin
Jul 16 2017 13:16
first of both
ajdev27
@ajdev27
Jul 16 2017 13:16
0 index?
Ene Catalin
@EneCatalin
Jul 16 2017 13:16
yes
ajdev27
@ajdev27
Jul 16 2017 13:16
like 0 1 2 3
Ene Catalin
@EneCatalin
Jul 16 2017 13:16
but it's rows and columns
in a multi dim array
ajdev27
@ajdev27
Jul 16 2017 13:16
ok
Ene Catalin
@EneCatalin
Jul 16 2017 13:16
[ ] [ ] is a two dim array
ajdev27
@ajdev27
Jul 16 2017 13:16
i know that part
Ene Catalin
@EneCatalin
Jul 16 2017 13:17
[ ] [ ] [ ] is called depression and suicide
ajdev27
@ajdev27
Jul 16 2017 13:18
LOL WHAT
Abubakar Hassan
@abhasy49
Jul 16 2017 13:19
Hello campers Please I need help on these var a = 6;
var b = 15;
var c = 'I am a string!';
the code is fine but it says c should not contain undefined and should have a value of "I am a String!". Any help please
Krishna Biradar
@kr5hn4
Jul 16 2017 13:21
@abhasy49 notice the capitalization of 'S' in String
ajdev27
@ajdev27
Jul 16 2017 13:22
@abhasy49 yea make S capital
madhuri soni
@sonimadhuri
Jul 16 2017 13:23
@abhasy49 it should not have the word string because in the latter part of the code you concatenate the word string to c
Abubakar Hassan
@abhasy49
Jul 16 2017 13:23
Thanks @ajdev27 ,@Kr5hn4 you guys are darling
CamperBot
@camperbot
Jul 16 2017 13:23
abhasy49 sends brownie points to @ajdev27 and @kr5hn4 :sparkles: :thumbsup: :sparkles:
:cookie: 230 | @kr5hn4 |http://www.freecodecamp.com/kr5hn4
:cookie: 216 | @ajdev27 |http://www.freecodecamp.com/ajdev27
Aita Kane
@aita-kane
Jul 16 2017 13:27
hello anyone know what effect is that or what to use to have one section resize on scroll like we see in this website : http://www.goodorganiconly.com/
Sweet Coding :)
@SweetCodingInc
Jul 16 2017 13:30
@aita-kane I think they're listening to mouse wheel events and adjusting padding depending of scroll up or scroll down
madhuri soni
@sonimadhuri
Jul 16 2017 13:35
@abhasy49 did you pass the test with that code?
Abubakar Hassan
@abhasy49
Jul 16 2017 13:36
yes Thank for your concern @sonimadhuri
CamperBot
@camperbot
Jul 16 2017 13:36
abhasy49 sends brownie points to @sonimadhuri :sparkles: :thumbsup: :sparkles:
:cookie: 326 | @sonimadhuri |http://www.freecodecamp.com/sonimadhuri
Aita Kane
@aita-kane
Jul 16 2017 13:37
@SweetCodingInc okk thank you
CamperBot
@camperbot
Jul 16 2017 13:37
aita-kane sends brownie points to @sweetcodinginc :sparkles: :thumbsup: :sparkles:
:cookie: 124 | @sweetcodinginc |http://www.freecodecamp.com/sweetcodinginc
madhuri soni
@sonimadhuri
Jul 16 2017 13:37
@abhasy49 but you arent supposed to have the word string in variable c .it is stated in the challenge
ajdev27
@ajdev27
Jul 16 2017 13:39
can someone help me with the lesson "Profile Lookup"
Sweet Coding :)
@SweetCodingInc
Jul 16 2017 13:40
@ajdev27 post your code
ajdev27
@ajdev27
Jul 16 2017 13:40
thats my problem i dont know where to start
Sweet Coding :)
@SweetCodingInc
Jul 16 2017 13:40
You have to loop over contacts
and compare first name of each object to the firstName that is passed to the function
if you find a contact where first names match, then you have to see if the passed in property exists on that matched object
May Kittens Devour Your Soul
@diomed
Jul 16 2017 14:03
[ ] [ ] [ ] is called my life
Ene Catalin
@EneCatalin
Jul 16 2017 14:04
hi cat
who would have guessed, vue is fun
have you done any tutorials on it ?
Jim Homme
@jhomme
Jul 16 2017 14:30
Hi all. I'm a blind developer and use a screen reader. When something is wrong with the code in the code window on the site, does the code listing with the line numbers show the code the system doesn't like in a different color or in some other way?
Muhammad Muhajir
@muhajirframe
Jul 16 2017 14:37
Hi people. How do you guys find a job? I'd love to do something. Even as a volunteer is fine.
Chase
@PreSIN
Jul 16 2017 14:50
anyone have tips for "Access MultiDimensional Arrays With Indexes" there is no hint page and i feel like i get it but obviously i dont lol
well. of course as i ask, it figure it out. thanks anyway lol
May Kittens Devour Your Soul
@diomed
Jul 16 2017 14:56
@EneCatalin is vue fun? really?
what is vue at all?
@muhajirframe volunteer to make me vue scrollbar :smirk:
Roxroy
@roxroy
Jul 16 2017 14:57
@muhajirframe , keep working through the challenges. When you are finished you will do same hands-on work for a non-profit organization.
Razvan
@razvanlikespizza
Jul 16 2017 15:00
How do you put spaces between table rows? Please?
Okopun
@Okopun
Jul 16 2017 15:24
@razvanlikespizza https://www.w3schools.com/css/css_table.asp Try this
shivam gupta
@shivamg11000
Jul 16 2017 15:28
curl -i https://api.github.com/adassad
what the -i in here specifies
limbu
@limbu
Jul 16 2017 15:45
hi guys how do you add a css reset from a cdn or a css forlder?
shivam gupta
@shivamg11000
Jul 16 2017 15:49
@limbu you wan to use a css library like bootstrap with cdn?
May Kittens Devour Your Soul
@diomed
Jul 16 2017 15:50
@limbu if u use bootstrap, u have css reset already included
Allan N Jeremy
@AllanJeremy
Jul 16 2017 16:03

Hey guys, working on the portfolio page for fcc . Would like to hear your thoughts

Here's the codepen

One issue I am facing though is the horizontal scroll, somehow I can't get the banner image to fit just within the screen

I have tried

width:100%;
margin:auto;

on my banner but no success there

JaviConqueror
@JaviConqueror
Jul 16 2017 16:07
Hi guys. When I add font awesome to my codepen project, I get the error message: The URL "" is invalid. Use the format https://domain/path.css. Would really appreciate if someone could help me out.
May Kittens Devour Your Soul
@diomed
Jul 16 2017 16:07
@JaviConqueror show how u added it
JaviConqueror
@JaviConqueror
Jul 16 2017 16:08
image.png
May Kittens Devour Your Soul
@diomed
Jul 16 2017 16:09
@JaviConqueror delete that
JaviConqueror
@JaviConqueror
Jul 16 2017 16:09
@diomed ???
May Kittens Devour Your Soul
@diomed
Jul 16 2017 16:09
u can easily add font awesome if u go to CSS tab and start just writing words font-awesome
JaviConqueror
@JaviConqueror
Jul 16 2017 16:11
@diomed Thanks, that fixed it!
madhuri soni
@sonimadhuri
Jul 16 2017 16:13
@AllanJeremy you could add overflow-x:hidden; to body tag in css if you wanna hide the horizontal scroll
Allan N Jeremy
@AllanJeremy
Jul 16 2017 16:15

@sonimadhuri , thanks :+1:

That actually worked great

CamperBot
@camperbot
Jul 16 2017 16:15
allanjeremy sends brownie points to @sonimadhuri :sparkles: :thumbsup: :sparkles:
:cookie: 327 | @sonimadhuri |http://www.freecodecamp.com/sonimadhuri
RakeshNerkar
@Rakesh18754
Jul 16 2017 16:15
var person = Object.create(null);
var employee = new Object(null);
console.log(Object.getPrototypeOf(person));  // null
console.log(Object.getPrototypeOf(employee));  // object{}
can any one explain the above case?
madhuri soni
@sonimadhuri
Jul 16 2017 16:15
@AllanJeremy :+1:
Muhammad Muhajir
@muhajirframe
Jul 16 2017 16:35
@roxroy hmm.. thank you.
CamperBot
@camperbot
Jul 16 2017 16:35
muhajirframe sends brownie points to @roxroy :sparkles: :thumbsup: :sparkles:
:star2: 1062 | @roxroy |http://www.freecodecamp.com/roxroy
Muhammad Muhajir
@muhajirframe
Jul 16 2017 16:36
@diomed what's vue scrollbar
Allan N Jeremy
@AllanJeremy
Jul 16 2017 16:38
:)
Aleksandar B.
@aleksandar-b
Jul 16 2017 17:06
HI, I am streaming redux App. CAREFULL!!! MAX VOLUME IS ON!
https://www.twitch.tv/svglove/
Chase
@PreSIN
Jul 16 2017 17:13
Anyone have a Discord chat based around JavaScript and or FCC? and helping each other?
May Kittens Devour Your Soul
@diomed
Jul 16 2017 17:17
FCC's discord is tumbleweed city, worse than here
Chase
@PreSIN
Jul 16 2017 17:33
dang
funny how you see 16,444 people, yet its dead lol
Xi
@yuman959
Jul 16 2017 17:37
Hi friends!
I got stuck on the Wherefore art thou exercise. This is the exercise link and my code https://www.freecodecamp.org/challenges/wherefore-art-thou. Any help is appreciated!
Nick Ross
@codecampNick
Jul 16 2017 17:43
@yuman959 may start with a for loop and then push the match?
Xi
@yuman959
Jul 16 2017 17:44

function whatIsInAName(collection, source) {
  // What's in a name?
  var arr = [];
  // Only change code below this line

  for (i=0;i<=collection.length; i++){
    for (var property in source){

    while(collection[i].hasOwnProperty(property) && collection[i].property == source.property)          {
            arr.push(collection[i]);  
           }
         } 
  }
  // Only change code above this line
  return arr;
}
whatIsInAName([{ first: "Romeo", last: "Montague" }, { first: "Mercutio", last: null }, { first: "Tybalt", last: "Capulet" }], { last: "Capulet" });
@codecampNick
May Kittens Devour Your Soul
@diomed
Jul 16 2017 17:47
it's most active room there is, I suppose
Chase
@PreSIN
Jul 16 2017 17:47
@ @diomed thank you!
CamperBot
@camperbot
Jul 16 2017 17:47
presin sends brownie points to @diomed :sparkles: :thumbsup: :sparkles:
:star2: 5173 | @diomed |http://www.freecodecamp.com/diomed
Nick Ross
@codecampNick
Jul 16 2017 17:48
stand by @yuman959
@yuman959
Xi
@yuman959
Jul 16 2017 17:51
Hey @codecampNick
Nick Ross
@codecampNick
Jul 16 2017 17:51
You need to fix this line
for (var property in source)
you need to compare and increment in order for the for loop to even “break"
Xi
@yuman959
Jul 16 2017 17:52
oh.. so this for loop is an infinite loop?
that’s why it’s incorrect?
Nick Ross
@codecampNick
Jul 16 2017 17:54
that is why you are seeing the error!
you might see something else that needs adjusted but you need to fix that first. :)
knight2
@knight2
Jul 16 2017 17:57

I am on the jQuery section of FCC. If I run the code in the FCC browser, it works. But If I try to run the exact same code via sublime text in chrome, the jquery does not work.

What am I missing here?

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js" type="text/javascript">
  $(document).ready(function(){
  $("button").addClass("animated bounce");

  });

</script>
May Kittens Devour Your Soul
@diomed
Jul 16 2017 17:58
u need another library for that
animate.css
Nick Ross
@codecampNick
Jul 16 2017 17:58
you have a “src” inside of your opening script tag @knight2
@knight2 that might need to be a link before your opening ‘script” tag
knight2
@knight2
Jul 16 2017 17:59
I have animated css included with <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css">
So I need to link it before that script tag?
May Kittens Devour Your Soul
@diomed
Jul 16 2017 18:00
any link goes between head tags above body
Nick Ross
@codecampNick
Jul 16 2017 18:00
yes @knight2 , you’re opening script tag will probably need to be “<script>"
knight2
@knight2
Jul 16 2017 18:00
  <link rel="stylesheet"
  href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css">
  <link rel="stylesheet"
  href="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js">

<script>
  $(document).ready(function(){
  $("button").addClass("animated bounce");

  });

</script>
still doesn't work
David Lower
@davidlower
Jul 16 2017 18:00
Evening everyone :wave:
May Kittens Devour Your Soul
@diomed
Jul 16 2017 18:00
hello @davidlower :cat:
Nick Ross
@codecampNick
Jul 16 2017 18:00
are you seeing any errors in your console @knight2 ?
May Kittens Devour Your Soul
@diomed
Jul 16 2017 18:01
@knight2 how is jquery stylesheet? lol
korzo
@korzo
Jul 16 2017 18:01
@knight2 You have link instead of script
knight2
@knight2
Jul 16 2017 18:02
I have no idea. I dont' know how to properly include it as the FCC doesn't explain how and I thought I was doing it right
Alexander Køpke
@alexanderkopke
Jul 16 2017 18:03
files with js that you want to bring into the html docs use <script src="link js file goes here"></script> @knight2
knight2
@knight2
Jul 16 2017 18:03

@alexanderkopke thanks now it is working ```

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css"></script>

<script>
$(document).ready(function(){
$("button").addClass("animated bounce");

});

</script>
```

CamperBot
@camperbot
Jul 16 2017 18:03
knight2 sends brownie points to @alexanderkopke :sparkles: :thumbsup: :sparkles:
:star2: 1625 | @alexanderkopke |http://www.freecodecamp.com/alexanderkopke
Alexander Køpke
@alexanderkopke
Jul 16 2017 18:03
awesome
Kyle Holm
@thekholm80
Jul 16 2017 18:05
good afternoon help room denizens
Alexander Køpke
@alexanderkopke
Jul 16 2017 18:05
:wave:
May Kittens Devour Your Soul
@diomed
Jul 16 2017 18:07
good afternoon @thekholm80 et @alexanderkopke :cat:
RakeshNerkar
@Rakesh18754
Jul 16 2017 18:15
var Person = {
  _name: "jade",
  getName:function(){
    console.log("this._name");
  }
}

var name = Person.getName;
console.log(name()); //Uncaught TypeError: name is not a function(…)
any idea why this givea an error?
alinadir
@alinadir
Jul 16 2017 18:15
hi everybody i need help.
i got stuck "Build a Wikipedia Viewer" duty.
my codepen codes are here https://codepen.io/alindr/full/MoRgVL/
especially i couldnt understand why it works this part
$.ajax({
url: '//en.wikipedia.org/w/api.php',
data: { action: 'query', list: 'search', srsearch:textt, format: 'json' },
dataType: 'jsonp',
success: function (data) {
    var allSearc = data.query.search;

    if (allSearc==[]){
      $("#entrySpace").append('<p>there is no results</p>');
    }
$.ajax({
url: '//en.wikipedia.org/w/api.php',
data: { action: 'query', list: 'search', srsearch:textt, format: 'json' },
dataType: 'jsonp',
success: function (data) {
    var allSearc = data.query.search;

    if (allSearc==[]){
      $("#entrySpace").append('<p>there is no results</p>');
my problem is if there is no matc in wikipedia, i want to warn like this "there is no results"
{"batchcomplete":"","query":{"searchinfo":{"totalhits":0},"search":[]}}
and i am really sorry for spoiler
Joshua Waller
@Obscureether1
Jul 16 2017 18:45
what am i missing with this.... let cosst = doccument.getElementByID('cost) let paid = doccument.getElementById('paid') let reminder = (paid - cost); findQuarters(reminders)
and it is cost... not cosst...lol
hello anyone taking a look?
catapulto
@catapulto
Jul 16 2017 18:52
hey help me guyz
Joseph
@revisualize
Jul 16 2017 19:02
4hrs left: Building Machine Learning Systems with Python
https://www.packtpub.com/packt/offers/free-learning
@catapulto with?????
catapulto
@catapulto
Jul 16 2017 19:04
how to code when high?
@revisualize
May Kittens Devour Your Soul
@diomed
Jul 16 2017 19:05
:unamused:
Joseph
@revisualize
Jul 16 2017 19:05
:|
catapulto
@catapulto
Jul 16 2017 19:08
@diomed @revisualize whats up babes?
Razvan
@razvanlikespizza
Jul 16 2017 19:09
Can I get your opinion guys? It really helps..
Joseph
@revisualize
Jul 16 2017 19:09
...
Brooks
@Brodavis
Jul 16 2017 19:11
@razvanlikespizza on what?
Razvan
@razvanlikespizza
Jul 16 2017 19:12
@Brodavis Waiting for someone to say "yes" ... :|
Brooks
@Brodavis
Jul 16 2017 19:12
@razvanlikespizza "yes"
Joseph
@revisualize
Jul 16 2017 19:12
@razvanlikespizza You wait for people to tell you that you can ask a question in a chat room?
@razvanlikespizza Even when asking to ask is a question.
hmmm.
Razvan
@razvanlikespizza
Jul 16 2017 19:13
@revisualize I know I am weird already :)))
image.png
Trying to do a footer :3...
May Kittens Devour Your Soul
@diomed
Jul 16 2017 19:14
but footer wont give in?
Joseph
@revisualize
Jul 16 2017 19:14
@catapulto You really need to evaluate your questionable life choice and figure out if where you are currently is where you want to be in one year. Or if you can make different choices that will seem like sacrifices now (which later you'll realize weren't/aren't) that will allow your life to pivot in a direction of greater value, self worth and merit upon society.
May Kittens Devour Your Soul
@diomed
Jul 16 2017 19:14
@razvanlikespizza mby explain what u're trying to achieve
looks like @catapulto ran into a jedi
Razvan
@razvanlikespizza
Jul 16 2017 19:15
@diomed I want people to criticize me , so I will do it better next time.
Joseph
@revisualize
Jul 16 2017 19:15
What are you trying to do?
What is happening? (What is your problem?)
What research have you done?
Have you looked at your developer console?
What/Where do you think the problem is?
Razvan
@razvanlikespizza
Jul 16 2017 19:16
@revisualize :| "Can I get your opinion guys? It really helps.." ???
Joseph
@revisualize
Jul 16 2017 19:16
@razvanlikespizza Tighten up the design.
catapulto
@catapulto
Jul 16 2017 19:16
zap
zoom
Razvan
@razvanlikespizza
Jul 16 2017 19:16
@revisualize FINNALY! I see..
Joseph
@revisualize
Jul 16 2017 19:16
@razvanlikespizza move the social buttons up more.. also spread them apart
catapulto
@catapulto
Jul 16 2017 19:17
@razvanlikespizza what did you see?
Joseph
@revisualize
Jul 16 2017 19:17
@razvanlikespizza what does it look like on mobile?
Razvan
@razvanlikespizza
Jul 16 2017 19:17
@catapulto I see what you mean . This idiom uses see in the sense of “perceive” or “comprehend,” a usage dating from 1300. Also see as far as I can see. The American Heritage® Idioms Dictionary.
@revisualize Thanks,thanks. :)
CamperBot
@camperbot
Jul 16 2017 19:18
razvanlikespizza sends brownie points to @revisualize :sparkles: :thumbsup: :sparkles:
:star2: 4351 | @revisualize |http://www.freecodecamp.com/revisualize
Joseph
@revisualize
Jul 16 2017 19:18
@razvanlikespizza Also what is whit the horiz rule? It looks like a massive break in content?
May Kittens Devour Your Soul
@diomed
Jul 16 2017 19:18
that copyright text is way too close to icons
and font is kinda Times New Roman lookey :/
Razvan
@razvanlikespizza
Jul 16 2017 19:18
@revisualize It not responsive yet btw
@diomed Its one of the best fonts :(
May Kittens Devour Your Soul
@diomed
Jul 16 2017 19:19
which one?
Razvan
@razvanlikespizza
Jul 16 2017 19:19
@diomed
image.png
May Kittens Devour Your Soul
@diomed
Jul 16 2017 19:21
@revisualize would u mind extracting something for me from css/js
Joseph
@revisualize
Jul 16 2017 19:23
@diomed wat?
May Kittens Devour Your Soul
@diomed
Jul 16 2017 19:23
this perspective animation effect: https://atomiks.github.io/tippyjs/
Razvan
@razvanlikespizza
Jul 16 2017 19:23
@revisualize @diomed Thanks.
CamperBot
@camperbot
Jul 16 2017 19:23
razvanlikespizza sends brownie points to @revisualize and @diomed :sparkles: :thumbsup: :sparkles:
:warning: razvanlikespizza already gave revisualize points
:star2: 5174 | @diomed |http://www.freecodecamp.com/diomed
Brooks
@Brodavis
Jul 16 2017 19:25
Does anyone have experiance with jqueryui ?
Joseph
@revisualize
Jul 16 2017 19:28
@diomed
<button class="btn tippy" title="Am I fancy enough for you?" data-animation="perspective" data-animatefill="false"><i class="material-icons icon-left">panorama_horizontal</i>Perspective animation</button>
Razvan
@razvanlikespizza
Jul 16 2017 19:31
:O
Margaret
@Margaret2
Jul 16 2017 19:35
@diomed it looks like it's just in the scss, just search for perspective in this file https://github.com/atomiks/tippyjs/blob/fd8b71f3f859e51c4a57e34d80b1974058323182/src/scss/tippy.scss
May Kittens Devour Your Soul
@diomed
Jul 16 2017 19:35
@Margaret2 I think I found it in css
.tippy-popper {
    max-width: 400px;
    -webkit-perspective: 800px;
    perspective: 800px;
    z-index: 9999;
    outline: 0;
    -webkit-transition-timing-function: cubic-bezier(.165, .84, .44, 1);
    transition-timing-function: cubic-bezier(.165, .84, .44, 1)
}
but I wonder is this it. lol
Margaret
@Margaret2
Jul 16 2017 19:36
@diomed no.... that's not it
May Kittens Devour Your Soul
@diomed
Jul 16 2017 19:36
damnit
Margaret
@Margaret2
Jul 16 2017 19:36
@diomed
@mixin enter-transform ($position, $animation) {
    @if ($animation == 'perspective') {
there's also a mixin leave-transform
and they are both used starting at line 236
May Kittens Devour Your Soul
@diomed
Jul 16 2017 19:39
is js needed for that effect?
Margaret
@Margaret2
Jul 16 2017 19:39
i doubt it's needed for the css effect, might be needed for the tooltip though
May Kittens Devour Your Soul
@diomed
Jul 16 2017 19:40
I actually wonder how would I apply that effect to modal
Margaret
@Margaret2
Jul 16 2017 19:42
maybe try it first using the library, then try to recreate it yourself
mstellaluna
@mstellaluna
Jul 16 2017 19:48
@catapulto Hello. I am one of our community moderators. Please review our code of conduct at http://www.freecodecamp.org/code-of-conduct/.
nils govaerts
@zyrt3c
Jul 16 2017 19:56
I’m stuck O.o I have 2 background images. both identical only different color. when I scale my browser down to minimun they both scale different, even when they have the same css … https://codepen.io/zyrt3c/full/ZyBOJL/
nils govaerts
@zyrt3c
Jul 16 2017 20:07
if anyone knows a solution for this problem, please let me know! It is driving me nuts O.o
Peter Cruckshank
@petercr
Jul 16 2017 20:36
@zyrt3c How does this look? I changed the background-size to cover and the postion: auto;
Is this what your looking for?
https://codepen.io/PeterCr/pen/OgGxmp?editors=1100
nils govaerts
@zyrt3c
Jul 16 2017 20:38
@petercr I’m still having the same problem :/ could be my browser but also get the same problem on mobile
Peter Cruckshank
@petercr
Jul 16 2017 20:40
@zyrt3c I'm not sure exactly what you are looking for? The top image no scales. Oh wait I think I know. brb
nils govaerts
@zyrt3c
Jul 16 2017 20:40
well if you scale your browser down, you will see that the white background scales different then the blue one
Peter Cruckshank
@petercr
Jul 16 2017 20:44
@zyrt3c yeah i don't know, sorry. At least I tried :wink: :smile: You should try the FCC forum, it might have to do with the padding or margin. I'm going back to work on my portfolio site now too. Good luck :+1:
nils govaerts
@zyrt3c
Jul 16 2017 20:45
@petercr thanks for the attempt ! will make a post over there, hopefully I can get a answer there. It is a small mistake but it is realy anoying me :) good luck to!
CamperBot
@camperbot
Jul 16 2017 20:45
:cookie: 122 | @petercr |http://www.freecodecamp.com/petercr
zyrt3c sends brownie points to @petercr :sparkles: :thumbsup: :sparkles:
freedomcoding2017
@freedomcoding2017
Jul 16 2017 21:47
whats up campers
I have a very basic question
just started on the camp
Alexander Køpke
@alexanderkopke
Jul 16 2017 21:49
welcome. So what is the question?
freedomcoding2017
@freedomcoding2017
Jul 16 2017 21:49
I'm trying to style elements in CSS
I feel as though I have done everything accurately yet it doesn't take
<style> h2{color:blue}</style>
if I'm not mistaken
Alexander Køpke
@alexanderkopke
Jul 16 2017 21:51
seems correct but a semi-colon is probably needed after blue
freedomcoding2017
@freedomcoding2017
Jul 16 2017 21:51
Lovely
Alexander Køpke
@alexanderkopke
Jul 16 2017 21:51
:+1:
freedomcoding2017
@freedomcoding2017
Jul 16 2017 21:52
You will definitely be seeing more of me
Thanks again
Eric Miller
@ericmiller777
Jul 16 2017 22:32
hey guys i get all green except for this string

function truncateString(str, num) {
// Clear out that junk in your trunk
var array = [];
var dot = "...";
str = str.split("");
for (var i = 0; i < str.length; i++){
if(str.length > 3 && str.length > num){
str = str.slice(0, num -3);
str.push("...");
}else if(str.length < 3 && str.length > num){
str = str.slice(0, num);
str.push("...");
}
}
return str.join("");
}

truncateString("Absolutely Longer", 2);

I cant figure out why
ah
its going negative
Ryan Draves
@RyanDraves
Jul 16 2017 22:34
@ericmiller777 which challenge is this?
Stephen James
@sjames1958gm
Jul 16 2017 22:35
@ericmiller777 Where are you checking for num <= 3 which is the requirement
Eric Miller
@ericmiller777
Jul 16 2017 22:35
truncate a string
Ryan Draves
@RyanDraves
Jul 16 2017 22:35
also, use ``` (upper left key) before and after your code
Eric Miller
@ericmiller777
Jul 16 2017 22:35
@sjames1958gm in the else
Stephen James
@sjames1958gm
Jul 16 2017 22:36
@ericmiller777 I only see str.length < 3 not num <= 3
truncateString("Absolutely Longer", 2); your code treats this in the if and not the else.
Eric Miller
@ericmiller777
Jul 16 2017 22:36
@sjames1958gm THANKS I ADDED THAT BUT STILL DOESNT SOLVE THE PROBLEM IM GOING NEGATIVE WITH THE SPLICE
CamperBot
@camperbot
Jul 16 2017 22:36
ericmiller777 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8084 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Eric Miller
@ericmiller777
Jul 16 2017 22:37
oops
sorry
Stephen James
@sjames1958gm
Jul 16 2017 22:37
@ericmiller777 Because you are doing num - 3 when num is 2
You shouldn't do num - 3 when num <=3 but you never check num <= 3
@ericmiller777 replace str.length > 3 with num > 3
Eric Miller
@ericmiller777
Jul 16 2017 22:38
This message was deleted
Ryan Draves
@RyanDraves
Jul 16 2017 22:38
@ericmiller777 3 of them ```
Eric Miller
@ericmiller777
Jul 16 2017 22:38
sorry
Ryan Draves
@RyanDraves
Jul 16 2017 22:38
hm, not sure why yours isn't turning to code. try a space before/after the ``` to separate it
Stephen James
@sjames1958gm
Jul 16 2017 22:39
There is no need for a loop either. Or even an array, because strings have slice and you can concatenate with +
Eric Miller
@ericmiller777
Jul 16 2017 22:40
@RyanDraves i tryed it both ways
Ryan Draves
@RyanDraves
Jul 16 2017 22:41
not sure why, I was able to do it :/
should work like this
Eric Miller
@ericmiller777
Jul 16 2017 22:42
function truncateString(str, num) {
  // Clear out that junk in your trunk
  var array = [];
  var dot = "...";
  str = str.split("");
  for (var i = 0; i < str.length; i++){
    if(str.length > 3 && str.length > num){
      str = str.slice(0, num -3);
      str.push("...");
    }else if(str.length <= 3 && str.length > num){
      str = str.slice(0, num);
      str.push("...");
    }
  }
  return str.join("");
}

truncateString("Absolutely Longer", 2);
:(
Stephen James
@sjames1958gm
Jul 16 2017 22:43
@ericmiller777 Use shift-enter to get new line without posting - the ``` need to be on their own line
Eric Miller
@ericmiller777
Jul 16 2017 22:44
@sjames1958gm thanks
CamperBot
@camperbot
Jul 16 2017 22:44
ericmiller777 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:warning: ericmiller777 already gave sjames1958gm points
Stephen James
@sjames1958gm
Jul 16 2017 22:44
@ericmiller777 :clap:
Eric Miller
@ericmiller777
Jul 16 2017 22:56
function truncateString(str, num) {
  // Clear out that junk in your trunk
  var array = [];
  var dot = "...";
  str = str.split("");
  for (var i = 0; i < str.length; i++){
    if(str.length > 3 && str.length > num){
      str = str.slice(0, num);
      if(str.length > 3){
        str = str.slice(0, num -3);
      }
      str.push("...");
    }else if(str.length <= 3 && str.length > num){
      str = str.slice(0, num);
      str.push("...");
    }
  }
  return str.join("");
}

truncateString("Absolutely Longer", 2);
anyway that works
im sure the other way is better
which i do understand kinda just i had already written all of this
LydaTech
@lydatech
Jul 16 2017 22:57
anyone any good with responsive background images?
Ryan Draves
@RyanDraves
Jul 16 2017 23:01
@lydatech I can take a crack at it. What's your question?
LydaTech
@lydatech
Jul 16 2017 23:04
@RyanDraves I have a main container wrapper class that holds all the content. i.e. bootstrap container. I have an image that has to scale both hight and width on all devices showing the whole image. short of writting a bunch of media quesries do yo know of a way?
@RyanDraves the image is a background image so classes wont work
Eric Miller
@ericmiller777
Jul 16 2017 23:05
this might be wrong but why cant you use bootstrap %?
LydaTech
@lydatech
Jul 16 2017 23:05
what do you mean?
Eric Miller
@ericmiller777
Jul 16 2017 23:06
width: 100% height 100%?
let me go look at my nav bar
LydaTech
@lydatech
Jul 16 2017 23:07
@ericmiller777 that would skew the image
Eric Miller
@ericmiller777
Jul 16 2017 23:07
@lydatech true
@lydatech all you can do then is keep the aspect ratio, im not sure how to tho
@lydatech probably just shouldnt listen to me tho
LydaTech
@lydatech
Jul 16 2017 23:11
@ericmiller777 lol ok thanks anyway
CamperBot
@camperbot
Jul 16 2017 23:11
lydatech sends brownie points to @ericmiller777 :sparkles: :thumbsup: :sparkles:
:cookie: 242 | @ericmiller777 |http://www.freecodecamp.com/ericmiller777
Manish Giri
@Manish-Giri
Jul 16 2017 23:19
@thekholm80 ty
CamperBot
@camperbot
Jul 16 2017 23:19
manish-giri sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1343 | @thekholm80 |http://www.freecodecamp.com/thekholm80
Ryan Draves
@RyanDraves
Jul 16 2017 23:23

@lydatech hm. the trick part here is that it's a background image. I'm not exactly sure here, but worst comes to worst you can use some JQuery and something like

$(window).resize(function() {
//change the size of the image to scale with the window size
});

then just use the resize function before the window is changed so the initial size fits correctly

@lydatech I'm sure there are some good articles on this for a simple fix. if you want the aspect ratio to remain intact, then the only property you can change is width, then let height = auto;. might mess up your content on small screen sizes though!