Skip to content

Sunitha-Sphinx-JS Adagrams #30

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 10 commits into
base: main
Choose a base branch
from
Open

Conversation

nelasunitha
Copy link

Not able to commit changes frequently due to power outage.

@nelasunitha nelasunitha changed the title Completed Adagrams Sunitha-Sphinx-JS Adagrams Nov 27, 2024
Copy link

@yangashley yangashley left a comment

Choose a reason for hiding this comment

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

Nice job on js-adagrams!

export const drawLetters = () => {
// Implement this method for wave 1
const drawnLetters = [];

Choose a reason for hiding this comment

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

Nice job using const here!

Comment on lines +54 to +55
const updatedArr = letterPoolArr.map(([l, freq]) =>
l === letter ? [l, freq - 1] : [l, freq]

Choose a reason for hiding this comment

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

These two lines are pretty jam packed with logic which makes it a little challenging to decipher. I'd prefer l to have a more descriptive name to make it easier to read.

word = word.toUpperCase();
let totalScore = 0;

for (let i = 0; i < word.length; i++) {

Choose a reason for hiding this comment

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

Prefer for / of loop instead since we don't need i to access each letter in word

nelasunitha and others added 9 commits December 6, 2024 11:47
Co-authored-by: Ashley Yang <[email protected]>
Co-authored-by: Ashley Yang <[email protected]>
Co-authored-by: Ashley Yang <[email protected]>
Co-authored-by: Ashley Yang <[email protected]>
Co-authored-by: Ashley Yang <[email protected]>
Co-authored-by: Ashley Yang <[email protected]>
Co-authored-by: Ashley Yang <[email protected]>
Co-authored-by: Ashley Yang <[email protected]>
Co-authored-by: Ashley Yang <[email protected]>
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.

2 participants