yasershomaf / movies Goto Github PK
View Code? Open in Web Editor NEWHomework for HackYourFutre week 5
Homework for HackYourFutre week 5
They can be disabled and they are not very user-friendly. Just display a warning like you do with the 'no results found' message.
You made a very awesome use of the extra parameters pageIndex
! Dynamically looking for the next set of pages is great!
Point 5, the hardest of all is missing.
i < 0
instead of i<0
and i === ii
instead of i===ii
.if
is not needed, if length is 0 it would loop 0 times. You could have put a check in like (Array.isArray(arr)
or arr == null
)arr.slice()
)Sometimes text nodes are created, sometimes innerHtml is set. Be consistent, and just append text nodes.
Great way how you handled missing images!
Don't put all code in one giant function, this is hard to read. Try to seperate these things into multiple functions: one that handles the request, one that creating of the main content, one that handles creating each sub element being created etc.
Edit: You did that actually but since they are all contained in a big function (which is not necessarily bad) but it's quite hard to read and too much is happening so the overview is hard. Putting comments between your code, commenting your functions would help a lot. Also seperate statements which belong together logically together, and then place a newline.
file.js
is a very non-descriptive file name. It tells us nothing about what it wants to do, and basically everything on your comuter is a file.
You are referencing variables from your script in your HTML. This is not needed at all. You could better make seperate functions (one which sets the last page) and then calls the request function.
The arrows on your HTML page are not very descriptives of what they do. Normally it's two types, one that goes to the end and one that goes one page further. I had to click them to really figure them out ^^
When I go to the next word but accidentally changed the content of the search bar while not wanting to search for it it takes the new value.
You could have stored the current 'query' in the document, just as you do with currentpages etc.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.