Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
p100sch15005yHm, what does it do. Are e-mail and password booleans or is just any non empty combination of the two considered valid?
Damn, javascript and auto conversion -
Okii255yOn a side note, you can often do away with the 'else' clause. I find it cleaner to write:
if (...) {
return a;
}
return b; -
sarafe1495y@Okii yeah, but you know lah, I don't even think about clean at first time, I just want to work and running. ;)
My first login function
const login = (email, password) => {
If (email && password) {
return true
} else {
return false
}
}
rant
first code
javascript