timoxley / functional-javascript-workshop

A functional javascript workshop. No libraries required (i.e. no underscore), just ES5.
2.05k stars 438 forks source link

Exercise 1 - Hello World #202

Open ngehani opened 4 years ago

ngehani commented 4 years ago

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

Oajwbfn commented 4 years ago

Hello, I had the same problem and I hope they will add the documentation before the exercise like javascripting. Anyway, I don't know if you're looking for the complete solution but for the moment try to use return instead of console.log() :)

apc0der commented 1 year ago

3 years later and I have the same problem, and they haven't addressed it. I also just finished the javascripting beginner course so I don't know how to deal with this.

anukritidata commented 1 year ago

Same! Same problem