Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
castiel
on Oct 1, 2014
|
parent
|
context
|
favorite
| on:
if (osName.startsWith("windows 9"))
Notice the "startsWith" function. It has nothing to do with "Windows 9" and everything to do with Windows 95 and 98
Sanddancer
on Oct 1, 2014
|
next
[–]
Yes, and "Windows 9" starts with "Windows 9". So the function will see that, "yep, the string's there" and throw it down the path of handling antique versions of windows.
Igglyboo
on Oct 1, 2014
|
prev
[–]
Do you know what "startsWith" does? It checks if the string starts with a given string.
"Windows 9", "Windows 95", and "Windows 98" all start with "Windows 9".
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: