AlexanderAndr / Alexander_BSU

0 stars 0 forks source link

Task 6-7 #5

Open ghost opened 4 years ago

ghost commented 4 years ago

1) Pull Request missed, next labs will not be validated without PR 2) CleanCode: do not use C style use liner rules Instad of

class TwitterPost
{
    arr=[];
    constructor(post)
    {
        this.arr = post;
        console.log(this.arr);
    }

    getPage(number1, number2, filter)//Îòñîðòèðîâàòü ïîñò.
    {
        if (number1 == undefined)
            number1 = 0;
        if (number2 == undefined)
            number2 = 10;
class TwitterPost {
    _posts = [];
    constructor(posts) {
        this.posts = _posts;
    }

    getPage(start, count, filterConfig) {
        if (!start) {
           start = 0;
        }
        // Or better
        count = count || 10;
       // or event better argument default

3) Private field notation

ghost commented 4 years ago

4) Simplify code, use arrow functions 5) Filter by date/hashtag skipped 6) Variables names are not readable, big - to clean code practice 7) Use Array prototype methods, do not use non strict == (use strict === instead) 8) A loot of more mistakes you did not learn JS enough ... So 5 for both of labs 6 and 7.