-
Notifications
You must be signed in to change notification settings - Fork 0
Add files via upload #20
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
base: js-12-2
Are you sure you want to change the base?
Conversation
if(!file) { | ||
const pole = document.getElementById('read'); | ||
const pole1 = document.getElementById('error'); | ||
pole.setAttribute("style", "background-color: coral"); |
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.
Делайте стилизацию при помощи классов
div.innerText = `Length: ${result.length}; Words: ${result.split(' ').length}`; | ||
const div1 = document.getElementById('results2'); | ||
div1.innerText = ''; | ||
var allowed = /\w/i; |
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.
Должны быть подсчитаны все символы, без исключений
const result = reader.result; | ||
const div = document.getElementById('results'); | ||
div.innerText = `Length: ${result.length}; Words: ${result.split(' ').length}`; | ||
const div1 = document.getElementById('results2'); |
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.
Давайте переменным осмысленные названия
let trs = document.querySelectorAll('#results2 div'); | ||
let table = document.getElementById('results2'); | ||
let sorted = [...trs].sort(function(a, b) { | ||
if (a.children[3].innerHTML >= b.children[3].innerHTML) { |
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.
Не делайте так сортировку. Это очень трудоемкий для браузера способ. Данные из интерфейса никогда не должны использоваться для сортировки!
No description provided.