Today, when you look at the advanced programming of JavaScript,
Not in line with my output,
<!DOCTYPE HTML><HTMLLang= "en"><Head> <MetaCharSet= "UTF-8"> <title></title> <Script>Document.writeln (parseint (" One",8)); //9Document.writeln (parseint ('1234fdas')); //1234Document.writeln (parseint ("")); //NaNDocument.writeln (parseint ("0xA")); //TenDocument.writeln (parseint (22.4)); // ADocument.writeln (parseint ("017")); //TenDocument.writeln (parseint (" the")); // theDocument.writeln (parseint ("0xf")); // the </Script></Head><Body></Body></HTML>
Why is it different?
Found in the bottom of the book.
The basis is also found in the MDN.
ECMAScript 5 removed octal parsing
The ECMAScript 5 specification no longer allows parseInt
the implementation environment of a function to use a 0
character-starting string as an octal value .
Https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/parseInt
The problem in the JS parseint () function: