Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FUNCTION RETURN VALUES #283

Open
2 tasks
ledsun opened this issue Sep 25, 2019 · 2 comments
Open
2 tasks

FUNCTION RETURN VALUES #283

ledsun opened this issue Sep 25, 2019 · 2 comments
Labels
new challenge request and discuss new challenges

Comments

@ledsun
Copy link
Collaborator

ledsun commented Sep 25, 2019

This is a proposal for a new challenge. Please give me ideas and feedback.

Title

FUNCTION RETURN VALUES

Goal

Learn how to handle function return values.

Problem

The result of the function is a value.
You can get the result of the function as follows:

const ret = Math.random()

The challenge:

Create a file named function-return-value.js.

*** TODO ***

Check to see if your program is correct by running this command:

javascripting verify arrays.js

TODO

  • What are the challenges of learning to handle function return values?
  • Should this challenge include "Destructuring assignment"?
@ledsun ledsun added the new challenge request and discuss new challenges label Sep 25, 2019
@itzsaga
Copy link
Member

itzsaga commented Sep 26, 2019

I think one of the main challenges is arrow functions and how they work.
const func = x => x
const func = (x, y) => y

const func = (x, y) => {
  return x
}
const func = x => (
  `No return statement needed for ${x}`
)

There are multiple different syntaxes to accomplish the same thing.

@ledsun
Copy link
Collaborator Author

ledsun commented Oct 1, 2019

There are currently no challenges to handle the arrow function.
I think we need to create an arrow function challenge before we can reference the arrow function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new challenge request and discuss new challenges
Projects
None yet
Development

No branches or pull requests

2 participants