Skip to content

Sunitha-Sphinx-JS Adagrams#30

Open
nelasunitha wants to merge 10 commits into
Ada-C22:mainfrom
nelasunitha:main
Open

Sunitha-Sphinx-JS Adagrams#30
nelasunitha wants to merge 10 commits into
Ada-C22:mainfrom
nelasunitha:main

Conversation

@nelasunitha

Copy link
Copy Markdown

Not able to commit changes frequently due to power outage.

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

@yangashley yangashley left a comment

Copy link
Copy Markdown

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!

Comment thread src/adagrams.js Outdated
Comment thread src/adagrams.js

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

Copy link
Copy Markdown

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 thread src/adagrams.js Outdated
Comment thread src/adagrams.js Outdated
Comment thread src/adagrams.js
Comment on lines +54 to +55
const updatedArr = letterPoolArr.map(([l, freq]) =>
l === letter ? [l, freq - 1] : [l, freq]

Copy link
Copy Markdown

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.

Comment thread src/adagrams.js Outdated
Comment thread src/adagrams.js
word = word.toUpperCase();
let totalScore = 0;

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

Copy link
Copy Markdown

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

Comment thread src/adagrams.js
Comment thread src/adagrams.js Outdated
Comment thread src/adagrams.js Outdated
nelasunitha and others added 9 commits December 6, 2024 11:47
Co-authored-by: Ashley Yang <ashley.minghui@gmail.com>
Co-authored-by: Ashley Yang <ashley.minghui@gmail.com>
Co-authored-by: Ashley Yang <ashley.minghui@gmail.com>
Co-authored-by: Ashley Yang <ashley.minghui@gmail.com>
Co-authored-by: Ashley Yang <ashley.minghui@gmail.com>
Co-authored-by: Ashley Yang <ashley.minghui@gmail.com>
Co-authored-by: Ashley Yang <ashley.minghui@gmail.com>
Co-authored-by: Ashley Yang <ashley.minghui@gmail.com>
Co-authored-by: Ashley Yang <ashley.minghui@gmail.com>
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