Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

findPotentialLikes javascript

class SocialNetworkQueries {
    constructor({ fetchCurrentUser }) {
        this.fetchCurrentUser = fetchCurrentUser;
    }

    async findPotentialLikes({ minimalScore } = { }) {
        const user = await this.fetchCurrentUser();

        // ...

        return {
            books: [
                "The Great Gatsby",
                "Don Quixote",
                "War and Peace",
            ]
        };
    }
    
     async fetchCurrentUser({ id } = { }) {
        const user = await this.fetchCurrentUser(id);

        // ...

        return {
            books: [
                "The Great Gatsby",
                "Don Quixote",
                "War and Peace",
            ]
        };
    }
}
 
PREVIOUS NEXT
Tagged: #findPotentialLikes #javascript
ADD COMMENT
Topic
Name
2+3 =