Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 17:13
    @mstellaluna banned @cmal
  • Jan 08 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
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
  • Jul 06 2018 15:20
    @texas2010 banned @imlegend19
  • Jul 03 2018 12:28
    @bjorno43 banned @vbvmatta
  • Jun 29 2018 13:54
    @bjorno43 banned @OGTechnoBoy
Saboor Malik
@MathematicsCoding
Is that for programming or something?
Gulsvi
@gulsvi
It's for fast typing, I heard that the one we use today was meant to be slow because old typewriters would get stuck
DVORAK puts all the vowels together on one side and most used letters on the right side
least used letters in the hard to reach areas
Saboor Malik
@MathematicsCoding
Yeah...
Hard to reach s
L = S
If I learn dvorak and I might be confused with qwerty..
Gulsvi
@gulsvi
Probably hard to switch between the two
Saboor Malik
@MathematicsCoding
Is there another layout?
Gulsvi
@gulsvi
Those are the only ones I know of QWERTY and DVORAK.
Two people hated QWERTY lol
Gulsvi
@gulsvi
lol
Saboor Malik
@MathematicsCoding
I have added href to button element but I click it then it doesnt go anywhere
target=_blank?
Gulsvi
@gulsvi
Yeah, another codepen thing
target="_blank"
Saboor Malik
@MathematicsCoding
<button href = "https://en.wikipedia.org/wiki/Bruce_Lee" target="_blank" class="fa fa-info-circle btn btn-primary"> Bruce Lees</button>
Gulsvi
@gulsvi
You can only use href="" on <a> elements
Saboor Malik
@MathematicsCoding
oh right..
So nest it with a elements right
Gulsvi
@gulsvi
No, you can replace <button> with <a>
the btn btn-primary will make it look like a button
Saboor Malik
@MathematicsCoding
<div>
  <a href="https://en.wikipedia.org/wiki/Bruce_Lee"</a>
     <button target="_blank" class="fa fa-info-circle btn btn-primary"> Bruce Lees</button>
</div>
Well this is fine
Gulsvi
@gulsvi
<a href = "https://en.wikipedia.org/wiki/Bruce_Lee" target="_blank" class="fa fa-info-circle btn btn-primary"> Bruce Lees</a>
Saboor Malik
@MathematicsCoding
Yeah..
Gulsvi
@gulsvi
I have to go now... good luck with the quote machine :)
Saboor Malik
@MathematicsCoding
@SkyCoder01 Thanks
CamperBot
@camperbot
mathematicscoding sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:warning: mathematicscoding already gave skycoder01 points
Alex Kuczera
@akubie
Hi there! Has anyone done "Record Collection" in the front end javascript? I am having difficulty with updating the properties of arrays within objects, but I swear I am doing it right! :D
Ken Haduch
@khaduch
@ImAlexanderK - what does your code look like?
@ImAlexanderK - just post the function part of it, not the entire collection object, if you want to show what you have.
Alex Kuczera
@akubie
Ok I'll do my best to share it
I haven't shared a code block before haha
Ken Haduch
@khaduch
use the Markdown format - three backticks ```, then a new line, then your code, then a newline, then three ```
This message was deleted
Alex Kuczera
@akubie
```
// Only change code below this line
function updateRecords(id, prop, value) {  

   if (value === "") {
        delete collection[id][prop];
    } else if (collection[id].hasOwnProperty(prop)) {
        if (prop === "tracks") {
            collection[id][prop].push(value);
            } else {
                collection[id][prop] = value;
            }
    } else {
        if (prop === "tracks") {
          collection[id] = prop;
          collection[id][prop] = "value";
        } else {
          collection[id] = "prop";
          collection[id][prop] = "value";
        }
    }
  return collection;
}
sweet! Thanks @khaduch for your patience
CamperBot
@camperbot
imalexanderk sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 2700 | @khaduch |http://www.freecodecamp.com/khaduch
Alex Kuczera
@akubie
Now I understand that maybe my function is incorrect, but I am mostly concerned with the bottom half of the function. The problem states to add in the 'prop' and 'value' if it does not exist... I thought I had it correct, but maybe I am messing up how I am adding in data to the arrays.
Ken Haduch
@khaduch
@ImAlexanderK - okay - you are not doing the tracks part properly - are any of the cases passing? It looks like it could be failing when the tracks property is not present in the object?
Alex Kuczera
@akubie
ahhhh I kind of looked past that part. now I know I have random quotation marks, its because I didn't know if
collection[id] = prop;
or
collection[id] = "prop"; is the correct way to add in a value to an array. Im about 99% sure its the first one
Ken Haduch
@khaduch
and actually, you are doing some of the things wrong if it isn't the tracks property. For instance - this: collection[id] = prop; is not correct. And this: collection[id][prop] = "value"; is not correct. None of the stuff on the bottom is correct...
Alex Kuczera
@akubie
haha ok, hence why none of it is working. I was able to get the top part working. I have half the problem solved, just a few cases aren't passing through
Ken Haduch
@khaduch
if you are accessing a record, you are using collection[id], and if you want to add a property with the value, and the value is being sent in the variable (the function arg) value, you would want to do this, for the non-"tracks" case: collection[id][prop] = value; Which is what you are doing in the top section of your code. The same thing should be done if the property is not already in the object.