V
V
Vladimir Vasilenko2017-10-05 21:21:13
JavaScript
Vladimir Vasilenko, 2017-10-05 21:21:13

Negative contribution on the toaster?

Deleted some of my toaster answers, my contribution is now "-1".
Is the negative deposit on the toaster a bug or a feature?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Derepko, 2019-06-28
@xEpozZ

Soon, a module will be created in npm to work with primitives)
Throw out this module. There are already regulars in JS.
Why flags g and m when working with a number? Why are you for intdoing parseFloat?

const pattern = /^[0-9]*$/;
const text = 40;

const result = pattern.test(text);

console.log(result);

M
Moderator, 2017-10-06
@vlvicvas

The situation was caused by a gap in the algorithm for calculating the contribution: for the own answers chosen by the decisions, the contribution was not accrued, but when they were deleted, the contribution was written off. This is what happened when you deleted your own answer to the question How to recover a Facebook account?
After you drew our attention to this, we made the necessary adjustments to the contribution calculation algorithm, thereby eliminating the reason for the appearance of negative values.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question