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

No description provided.

@honest-hrundel
Copy link

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

@honest-hrundel
Copy link

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

@honest-hrundel
Copy link

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

@honest-hrundel
Copy link

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

@honest-hrundel
Copy link

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

@honest-hrundel
Copy link

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

@honest-hrundel
Copy link

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

@honest-hrundel
Copy link

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

@honest-hrundel
Copy link

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

@honest-hrundel
Copy link

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

@honest-hrundel
Copy link

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

@honest-hrundel
Copy link

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

@honest-hrundel
Copy link

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

@honest-hrundel
Copy link

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

@honest-hrundel
Copy link

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

@honest-hrundel
Copy link

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

@honest-hrundel
Copy link

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

@honest-hrundel
Copy link

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

@honest-hrundel
Copy link

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

@honest-hrundel
Copy link

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

@honest-hrundel
Copy link

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

@honest-hrundel
Copy link

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

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

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;

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)) {

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;

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 = [];

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;

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 !== '') &&

Choose a reason for hiding this comment

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

скобки

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

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

@honest-hrundel
Copy link

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

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

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}$)/;

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 === '') {

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 ||

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;

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();

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];

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];

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];

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