-
Notifications
You must be signed in to change notification settings - Fork 78
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
feat: math func lab + codewars #49
base: Habibulina_Alina_Mihajlovna
Are you sure you want to change the base?
Conversation
rpgsaga/saga/src/index.ts
Outdated
@@ -1 +1,34 @@ | |||
console.log('Hello world'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Создай отдельный файл под эту лабу, в индексе либо храни экспорты, либо удали
rpgsaga/saga/src/index.ts
Outdated
console.log(`Ответы к задаче A: ${taskA(xStart, xEnd, xStep)}`); | ||
console.log(`Ответы к задаче B: ${taskB(listX)}`); | ||
|
||
export function death(x: number) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Укажи возвращаемый тип
rpgsaga/saga/src/index.ts
Outdated
return res; | ||
} | ||
|
||
export function taskA(xStarts: number, xEnds: number, xSteps: number) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Возвращаемый тип
rpgsaga/saga/src/index.ts
Outdated
return listOfRes; | ||
} | ||
|
||
export function taskB(listsX: Array<number>) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Вместо Array<number>
просто используй number[]
. Возвращаемый тип
rpgsaga/saga/src/index.ts
Outdated
} | ||
|
||
export function taskB(listsX: Array<number>) { | ||
const listOfRes = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Укажи тип
rpgsaga/saga/src/index.ts
Outdated
} | ||
|
||
export function taskA(xStarts: number, xEnds: number, xSteps: number) { | ||
const listOfRes = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Укажи тип
rpgsaga/saga/src/index.ts
Outdated
console.log(`Ответы к задаче B: ${taskB(listX)}`); | ||
|
||
export function death(x: number) { | ||
const res = (Math.pow(Math.sin(x), 3) + Math.pow(Math.cos(x), 3)) * Math.log(x); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
можно сократить, добавив return сразу сюда
No description provided.