mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-24 18:11:38 +00:00
Merge pull request #1277 from teabaggs/master
[javascript] Fix for issue 1248
This commit is contained in:
commit
428f403bc8
@ -475,9 +475,6 @@ myNumber === myNumberObj; // = false
|
|||||||
if (0){
|
if (0){
|
||||||
// This code won't execute, because 0 is falsy.
|
// This code won't execute, because 0 is falsy.
|
||||||
}
|
}
|
||||||
if (Number(0)){
|
|
||||||
// This code *will* execute, because Number(0) is truthy.
|
|
||||||
}
|
|
||||||
|
|
||||||
// However, the wrapper objects and the regular builtins share a prototype, so
|
// However, the wrapper objects and the regular builtins share a prototype, so
|
||||||
// you can actually add functionality to a string, for instance.
|
// you can actually add functionality to a string, for instance.
|
||||||
|
Loading…
Reference in New Issue
Block a user