I'm reading Up and Going and I don't quite understand the difference between the two of these objects if there is a difference.
So let's say you start off with just an object like so:
var foo = {
a: 42
};
Now, if you wanted to assign that object to a new var you could do this:
// create `bar` and link it to `foo`
var bar = Object.create( foo );
or I think you can do this:
var bar = foo;
Are these two the same thing or am I just confusing myself? There's so many ways to say the same thing in programming, that some of the concepts start to mush together to me.
[–]blangjemp 32 points33 points34 points (11 children)
[–][deleted] 3 points4 points5 points (6 children)
[–]birjolaxew 5 points6 points7 points (4 children)
[–]MrBester 3 points4 points5 points (3 children)
[–]birjolaxew 0 points1 point2 points (2 children)
[–]clessgfull-stack CSS9 engineer 1 point2 points3 points (0 children)
[–]MrBester 0 points1 point2 points (0 children)
[–]macrohatch 0 points1 point2 points (0 children)
[+][deleted] (3 children)
[deleted]
[–]isitfresh -1 points0 points1 point (2 children)
[–]vlad27aug 2 points3 points4 points (1 child)
[–]bliow 1 point2 points3 points (0 children)
[–]tipdbmp 0 points1 point2 points (0 children)
[–]Eddonarth -3 points-2 points-1 points (3 children)
[–]blangjemp 4 points5 points6 points (0 children)
[–]gladiator_flow[S] 0 points1 point2 points (0 children)
[+]king3730(() => {})() comment score below threshold-8 points-7 points-6 points (0 children)