Skip to content

Мартовицкая Вероника#109

Open
Veronica2998 wants to merge 34 commits intourfu-2018:masterfrom
Veronica2998:master
Open

Мартовицкая Вероника#109
Veronica2998 wants to merge 34 commits intourfu-2018:masterfrom
Veronica2998:master

Conversation

@Veronica2998
Copy link
Copy Markdown

No description provided.

@honest-hrundel
Copy link
Copy Markdown

🍅 Не пройден линтинг или базовые тесты

@honest-hrundel
Copy link
Copy Markdown

🍅 Не пройден линтинг или базовые тесты

@honest-hrundel
Copy link
Copy Markdown

🍅 Не пройден линтинг или базовые тесты

@honest-hrundel
Copy link
Copy Markdown

🍅 Не пройден линтинг или базовые тесты

@honest-hrundel
Copy link
Copy Markdown

🍅 Не пройден линтинг или базовые тесты

@honest-hrundel
Copy link
Copy Markdown

🍅 Не пройден линтинг или базовые тесты

@honest-hrundel
Copy link
Copy Markdown

🍅 Не пройден линтинг или базовые тесты

@honest-hrundel
Copy link
Copy Markdown

🍅 Не пройден линтинг или базовые тесты

@honest-hrundel
Copy link
Copy Markdown

🍅 Не пройден линтинг или базовые тесты

@honest-hrundel
Copy link
Copy Markdown

🍅 Не пройден линтинг или базовые тесты

@honest-hrundel
Copy link
Copy Markdown

🍅 Не пройден линтинг или базовые тесты

@honest-hrundel
Copy link
Copy Markdown

🍅 Не пройден линтинг или базовые тесты

@honest-hrundel
Copy link
Copy Markdown

🍅 Не пройден линтинг или базовые тесты

@honest-hrundel
Copy link
Copy Markdown

🍅 Не пройден линтинг или базовые тесты

@honest-hrundel
Copy link
Copy Markdown

🍅 Не пройден линтинг или базовые тесты

@honest-hrundel
Copy link
Copy Markdown

🍏 Пройдено тестов 26 из 26

@honest-hrundel
Copy link
Copy Markdown

@FrodoTheTrue обрати внимание: решено доп. задание

@honest-hrundel
Copy link
Copy Markdown

🍅 Не пройден линтинг или базовые тесты

@honest-hrundel
Copy link
Copy Markdown

🍅 Не пройден линтинг или базовые тесты

@honest-hrundel
Copy link
Copy Markdown

🍅 Не пройден линтинг или базовые тесты

@honest-hrundel
Copy link
Copy Markdown

🍏 Пройдено тестов 26 из 26

@honest-hrundel
Copy link
Copy Markdown

@FrodoTheTrue обрати внимание: решено доп. задание

phone-book.js Outdated
*/
function update(phone, name, email) {
if (phoneBook[phone] && isValidParams(phone, name, email)) {
if (!email || (email === '')) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

скобки лишние

phone-book.js Outdated
return 0;
}
let res;
var count = 0;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

let

phone-book.js Outdated
}
let res;
var count = 0;
for (var phone of Object.keys(phoneBook)) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

const

phone-book.js Outdated
return [];
}
const result = [];
var res;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

let

phone-book.js Outdated
}

function view(result) {
var recordSought = [];
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

const

phone-book.js Outdated
return 0;
}
const newCsv = csv.split('\n');
var count = 0;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

let

phone-book.js Outdated
function isValidParams(phone, name) {
var tel = /(^[0-9]{10}$)/;

return phone && (tel.test(phone)) && (name !== '') &&
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

скобки

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

name !== '' можно не проверять

@honest-hrundel
Copy link
Copy Markdown

🍏 Пройдено тестов 26 из 26

@honest-hrundel
Copy link
Copy Markdown

@FrodoTheTrue обрати внимание: решено доп. задание

*/
function add(phone, name, email) {
if (!(phone in phoneBook) && isValidParams(phone, name, email)) {
if (!email || email === '') {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

'' == false

* @returns {Boolean}
*/
function isValidParams(phone, name) {
var tel = /(^[0-9]{10}$)/;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

const

*/
function update(phone, name, email) {
if (phoneBook[phone] && isValidParams(phone, name, email)) {
if (!email || email === '') {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

'' == false

if (query === '*') {
return record;
}
if (record[0].includes(query) === true || record[1].includes(query) === true ||
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

давай извлечем из record все сразу

result.push(res);
}
}
var record;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

const

var record;
record = view(result);

return record.sort();
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

как сортируем?

let count = 0;
for (let line of newCsv) {
let contact = line.split(';');
var phone = contact[1];
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

const

for (let line of newCsv) {
let contact = line.split(';');
var phone = contact[1];
var name = contact[0];
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

const

let contact = line.split(';');
var phone = contact[1];
var name = contact[0];
var email = contact[2];
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

const

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants