-
Notifications
You must be signed in to change notification settings - Fork 0
done #2
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
base: master
Are you sure you want to change the base?
done #2
Conversation
| function foo(func) { | ||
| // What to do here? | ||
| // Replace this comment and the next line with your code | ||
| return ('Hi, I am AaaaT, who are you?'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same problem again. This function should take a function and invoke/call it. Not return anything.
| } | ||
| } | ||
| } | ||
| return flattenArr3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works, but also take a look at .flat() later. May have made things even easier ;)
|
|
||
| //x is 9 and does not change after the f1 function is executed but it does if I console.log(f1(x)), I do not know why. Maybe because x was defined outside of the f1 function scope | ||
|
|
||
| //y is returned after going through the f2 function where the value of y(that is an object containing x) is changed by adding 1 to x. 9+1=10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you get it (?). Another example:
let a = 4
let b = a
a += 1
What's the value of b?
vs objects...
let a = { name: 'gabe' }
b = a
a.country = 'us'
what's the value of b?
Do you see the difference?
No description provided.