by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • May 14 22:39
    @bjorno43 banned @minitechtips_twitter
  • May 14 22:38
    @bjorno43 banned @real-action
  • Feb 01 00:27
    @bjorno43 banned @Ndoua
  • Jan 07 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
  • Jul 29 2018 01:00
    @bjorno43 banned @jkyereh
zootechdrum
@zootechdrum
Why am i getting the message on the bottom?
i am using the console in chrome to type in the function
Brad
@bradtaniguchi
@zootechdrum Your console log uses i, but its outside of the for loop
so there is no i, thus i is undefined
Idk about your error tho, seems like its related to something else. Something might not be coming as expected ( can you printout str before the for loop?)
zootechdrum
@zootechdrum
the main thing i want to do is get the length of the index that var i is on. For whatever reason I get an error saying cant get length of unde
@bradtaniguchi
Brad
@bradtaniguchi
Oh ok yea
zootechdrum
@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
zootechdrum
@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
zootechdrum
@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
UnorthodoxThing
@UnorthodoxThing
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:
UnorthodoxThing
@UnorthodoxThing
@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