Skip to content

Exercise 1 - Hello World #202

@ngehani

Description

@ngehani

I must have missed the lesson on module.exports somewhere because I don't understand it. I took the Javascripting workshop and then it recommended this functional-javascript workshop. I didn't get exposed to this previously

This is the output:

(base) Neils-MacBook-Pro-2:javascripting neilg$ functional-javascript verify uppercase.js
NEIL GEHANI // this is the right output though
✗ You should always return a function using the module.exports object.
Could not verify: You should always return a function using the module.exports object.
(base) Neils-MacBook-Pro-2:javascripting neilg$

This is the function:

let input = 'neil gehani'
function upperCaser(input) {
// SOLUTION GOES HERE
console.log(input.toUpperCase())
}
module.exports = upperCaser(input)

I also tried it with the following:

function upperCaser(input) {
// SOLUTION GOES HERE
console.log(input.toUpperCase())
}
module.exports = upperCaser('neil gehani')
//this shows the same result as above

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