Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Vishal-raj-1/Awesome-JavaScript-Projects
/ getClassByRate
Function
getClassByRate
assets/js/netflix.js:53–61 ·
view source on GitHub ↗
(vote)
Source
from the content-addressed store, hash-verified
51
}
52
53
function
getClassByRate(vote) {
54
if
(vote >= 8) {
55
return
'green'
56
}
else
if
(vote > -5) {
57
return
'orange'
58
}
else
{
59
return
'red'
60
}
61
}
62
63
64
form.addEventListener(
'submit'
, (e) => {
Callers
1
showMovies
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected