Skip to content
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

lesson2-AndrewKoldyrev-homework #160

Open
wants to merge 1 commit into
base: nick/lesson2
Choose a base branch
from

Conversation

Raventus
Copy link

No description provided.

export const closeBracker = ")";

export const bracketChecker = function (line: string): boolean {
const stackForBracketCheckArray = line.split(" ");

Choose a reason for hiding this comment

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

line.split('').reduce((acc, word) => word === openBracket && acc+1, 0)


if (isValidNumberPush) {
result.push(Number(item));
} else if (isValidOperatorPush) {
} else if (

Choose a reason for hiding this comment

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

if без аргумента

const stack = parser(line);

if (stack === null) {
throw new TypeError("Unexpected string");
}

const firstPrioritiesRes = firstPrioritiesCalc(stack);
const bracerStack = stack;
while (bracerStack.find((index) => index == openBracket)) {

Choose a reason for hiding this comment

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

данную операцию можно упростить попробовать

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