This chapter has focused on the use of functions that you define yourself. Bear in mind that JavaScript also provides a number of built-in functions that are part of the language. For example, the parseInt() function converts a string to an integer, and the Math.sin() function computes the sine of a number. For the most part, built-in functions behave just like user-defined functions: you can assign them to new variables, object properties, and array elements, and you can invoke them through these new variable names, properties or array elements. Practically the only discernible difference between a built-in function and a user-defined one becomes apparent when you try to print the value of a built-in function: the body of the function is replaced with the string "[native code]", indicating that the function is not itself implemented in JavaScript.
file: /Techref/language/java/script/definitive/ch06_04.htm, 3KB, , updated: 2019/10/14 15:00, local time: 2024/11/25 13:49,
18.218.75.58:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://ecomorder.com/techref/language/java/script/definitive/ch06_04.htm"> [Chapter 6] 6.4 Built-in Functions</A> |
Did you find what you needed? |
Welcome to ecomorder.com! |
Welcome to ecomorder.com! |
.