Skip to content
This repository was archived by the owner on Jan 14, 2024. It is now read-only.

NW5-Azadeh Roshan-Core-1-Coursework-Week3 - #154

Open
azadehroshan wants to merge 4 commits into
CodeYourFuture:mainfrom
azadehroshan:main
Open

NW5-Azadeh Roshan-Core-1-Coursework-Week3#154
azadehroshan wants to merge 4 commits into
CodeYourFuture:mainfrom
azadehroshan:main

Conversation

@azadehroshan

Copy link
Copy Markdown

sorry I forgot to pull request mine.

@SteveLeicester

Copy link
Copy Markdown

Thanks for making the pull request.

I noticed in A-undefined you have


let a
console.log

Did you mean to put console.log(a);

Note that console.log is a function but to make any function actually happen you need the brackets. You can also make a function happen straight away like this.

let myAnswer = function add(a,b){
	return a+b;
}(3,4); 

or using an arrow function (also called a lamda)

let myAnswer = ((a,b) => a+b)(3,4);

Can you see? (3,4) makes the function happen.

console.log is the function but

console.log() it is the () which make the function happen (but of course give the function something to output to the console).

Well that is to help you understand a little bit better I hope.

I didn't really find anything else to say. The exercises look good and your mandatory tests are working so excellent.

A very good submission showing lots of understanding.

Thank you
Steve

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants