Skip to content

exercise-flip-book #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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

pallavisarwar
Copy link
Collaborator

No description provided.

@pallavisarwar pallavisarwar self-assigned this May 6, 2024
@pallavisarwar pallavisarwar requested a review from Smita81 May 6, 2024 08:59
@Smita81
Copy link
Collaborator

Smita81 commented May 6, 2024

done.

@Smita81 Smita81 requested a review from dannyelcf May 6, 2024 10:37
@@ -1,4 +1,10 @@
/**
*
*/
export const reverseAndUpper = () => {};
export const reverseAndUpper = (input) => {
const upperCased = input.toUpperCase();
Copy link
Owner

Choose a reason for hiding this comment

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

Run npm run format to correctly indent the code.

Comment on lines +11 to +21
for (const array of arrayOfArrays){
console.log(array);
const tr = document.createElement('tr');
for (const element of array){
console.log(element);
const td = document.createElement('td');
td.innerText = element ;
tr.appendChild(td);
}
table.appendChild(tr);
}
Copy link
Owner

Choose a reason for hiding this comment

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

When we have an arrayOfArrays represeting a table, usually we use names like row and column in the for loops.

Suggested change
for (const array of arrayOfArrays){
console.log(array);
const tr = document.createElement('tr');
for (const element of array){
console.log(element);
const td = document.createElement('td');
td.innerText = element ;
tr.appendChild(td);
}
table.appendChild(tr);
}
for (const row of arrayOfArrays){
console.log(row);
const tr = document.createElement('tr');
for (const column of row){
console.log(column);
const td = document.createElement('td');
td.innerText = column ;
tr.appendChild(td);
}
table.appendChild(tr);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants