Skip to content

function body as a string test #9

@chrisgillis

Description

@chrisgillis

var multiply = function (a, b) {
//An internal comment
return a * b;
};
var stupid = "function (a, b) {
return a * b;
}"
expect(multiply.toString()).toBe(stupid);

why doesn't that work? if i remove the '' lien terminators it works but Firefox throws an unterminated string literal error.

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