8000 Expected results on topics/about_reflection.js · Issue #53 · liammclennan/JavaScript-Koans · GitHub
[go: up one dir, main page]

Skip to content

Expected results on topics/about_reflection.js #53

@xrx

Description

@xrx

I'm wondering, what are the expected results on https://github.com/liammclennan/JavaScript-Koans/blob/master/topics/about_reflection.js#L58-L60

I get empty quotes, but i'm not sure if that is what expected, so I searched a little bit and based on https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Function/name I changed locally:

var A = function() {
    this.aprop = "A";
};

var B = function() {
    this.bprop = "B";
};

on top of that file to

function A() {
    this.aprop = "A";
};

function B() {
    this.bprop = "B";
};    

And i get "A" as the expected constructor.name value, which makes more sense to me. If I'm wrong or missing sth. could you explain why?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0