Skip to content

feat:study case callback & closure#5

Open
Ghianlughi wants to merge 1 commit intomainfrom
feat/study-case-callback
Open

feat:study case callback & closure#5
Ghianlughi wants to merge 1 commit intomainfrom
feat/study-case-callback

Conversation

@Ghianlughi
Copy link
Copy Markdown
Owner

No description provided.

@Ghianlughi Ghianlughi added the enhancement New feature or request label Dec 19, 2023
@Ghianlughi Ghianlughi self-assigned this Dec 19, 2023
Copy link
Copy Markdown

@rneko26 rneko26 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bisa di-refactor lagi di bagian Closure nya


let myClosure = createClosure(18);

myClosure(); No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Di bagian closure bisa di-refactor agar lebih mudah dibaca. Berikut adalah contoh sederhana dari closure.

function show(callback) {
  console.log(callback());
};

show(function() {
return "Hello from closure";
});

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants