Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jun 19 2020 20:09
    @krisb1220 banned @Gastony
  • May 14 2020 22:39
    @bjorno43 banned @minitechtips_twitter
  • May 14 2020 22:38
    @bjorno43 banned @real-action
  • Feb 01 2020 00:27
    @bjorno43 banned @Ndoua
  • Jan 07 2020 03:10
    @bjorno43 banned @doctor-sam
  • Aug 17 2019 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 2019 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 2019 17:13
    @mstellaluna banned @cmal
  • Jan 08 2019 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
Cesar Gomez
@zootechdrum
I tried this too

function findLongestWord(str) {

var longest = 0;
var changedStr = str.split(' ');

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

}

findLongestWord("hel00 yoiii cool");

Brad
@bradtaniguchi
My original mention of this code: changedStr[i].length doesnt work
I think your string.length is off by 1
Cesar Gomez
@zootechdrum
function findLongestWord(str) {

  var longest = 0;
  var changedStr = str.split(' ');

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

}

findLongestWord("hel00 yoiii cool");
let me see
Brad
@bradtaniguchi
if your string was coolthe length is 4, but if you do changeString[4] its undefined, as thats the 5th spot
Cesar Gomez
@zootechdrum
i think you might be on to something lo
l
Brad
@bradtaniguchi
But then i < str.length wont work :/
so I might be wrong :/
Just double checked, it should work, BUT I noticed your trying to update the changedStr variable.
That's incorrect, since if you provide just 1 word, but your checking against the length of the string it will break
so your example has changedStr = ['hel00', 'yoii', 'cool']; so its length is just 3
but the str length is like 15 or so
Caroline Rozali
@hyfydistro
Hello, does anyone know how to make a checkbox dropdown menu and checkbox dropdown submenu alltogether? I'm having a difficult time. :(
Brad
@bradtaniguchi
@UnorthodoxThing Are you using a framework or trying to do this from scratch?
JoEezy
@JoEeeezy_twitter
can someone help me ... i screwed up again .. i'm trying to get the "Search Wikipedia" button to the right of the form and put them in the center of the page under the title..... :worried:
grid system is confusing me :anguished:
Caroline Rozali
@hyfydistro
@bradtaniguchi What do you mean by a 'framework'? I think mostly from scratch. I tried learning from a video online. I also be CSS and HTML only. This is what I've got so far... https://codepen.io/UnorthodoxThing/pen/oENvEX
Brad
@bradtaniguchi
@UnorthodoxThing Well if you mean you want to make a dropdown with checkboxes in it I think you will need to create it from scratch using JS and css
If you don't or cant use JS for this, then you probably have to rely more on what html provides ( they have a multiselect option for select)
@JoEeeezy_twitter let me see
JoEezy
@JoEeeezy_twitter
i changed it since @bradtaniguchi i ended up copying this code and modifying it https://i.imgur.com/XgEaWb3.png
i'm not sure if it works because of the form-inline class but i could've swore i've tried that before...
Brad
@bradtaniguchi
If the form tag scares you, you can always change it to something else.
JoEezy
@JoEeeezy_twitter
i think it's just that i'm confusing it with the input tag
John Brann
@jdbrann
@khaduch Wow that was some great feedback and things I can look up and read up on more. I kinda feel I rushed in to making the page and maybe bit off more than I can chew without seeking out more training first but your feedback did a great job of highlighting some of the misses (I took notes down to look up your suggestions/"how to do...")that will help me grow and that is what I needed! Thanks!!!
CamperBot
@camperbot
jdbrann sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3844 | @khaduch |http://www.freecodecamp.org/khaduch
Brad
@bradtaniguchi
@JoEeeezy_twitter Just remember the form tag will try to "submit" to a backend if the user hits enter, or clicks on a button that isn't type="button"
JoEezy
@JoEeeezy_twitter
@bradtaniguchi thanks , i was wondering why the button kept refreshing the page even though i hadn't set it up in js yet :smile:
CamperBot
@camperbot
:cookie: 443 | @bradtaniguchi |http://www.freecodecamp.org/bradtaniguchi
joeeeezy_twitter sends brownie points to @bradtaniguchi :sparkles: :thumbsup: :sparkles:
Brad
@bradtaniguchi
@JoEeeezy_twitter Yea you will need to override that behavior haha
Greg Engler
@gmengler
hey folks, currently working on the random quote generator and having a lot of trouble with the twitter API. I've been trying to decipher Twitter's documentation with no luck - any guidance anyone could provide?
JoEezy
@JoEeeezy_twitter
@gmengler // Twitter Button $("#twitter").on("click", function() { $("#tweetit").attr("href", 'https://twitter.com/intent/tweet?text=' + "\"" + $("#quotetext").text() + "\" " + " -" + $("#author").text()); });
Greg Engler
@gmengler
nevermind, figured i out
it*
hah, thanks Jo
JoEezy
@JoEeeezy_twitter
@gmengler np :smile: i had the same problem... looking thru docs for an hour+ before realizing i can just do it with a link lol
Greg Engler
@gmengler
actually figured it out through the docs surprisingly, and that never happens
JoEezy
@JoEeeezy_twitter
haha nice ... i'm in the same boat right now with bootstrap doc
trying to figure out how to make the form and the "search wikipedia" button centered thru bootstrap
i know it can be done with css with margins but i'm trying to learn the bootstrap way for responsive content
Greg Engler
@gmengler
hmmm I think I've dealt with something like that before, lemme check
does codepen automatically "run" your code when you make an edit or do you have to click something?
JoEezy
@JoEeeezy_twitter
it usually autoruns but i believe theres an option in settings to turn that off (in case you're using apis and dont' want it calling everytime you edit)