This blog is partly devoted to the sharing of my learning of the English language (my well mastered mother tongue is Chinese and I am not an English teacher) and its *cultures*, partly to the current significant trends in Canada and in the world, and partly to my own random thoughts and little life.
I am not religious, but I am somewhat interested in Christianity and Buddhism, among other personal interests.
Welcome. And, have a good day.
Sunday, June 11, 2017
Let's parse the function "parseInt", which appears in both Java and JavaScript.
>
> parseInt(12.5);
12
>
In the above little example, 12.5 is not an Int, but is a float. On the other hand, the return value 12 is an Int.
So, a more accurate name for the function would be "parseToInt."
No comments:
Post a Comment