Archive for August, 2007

JavaScript Programmer’s (Web site developers) Reference Dec Hex Sym Unicode Description

Friday, August 24th, 2007

JavaScript Programmer’s Reference Dec Hex Sym Unicode Description 003 03 ETX u0003 End of text 004 04 EOT u0004 End of transmission 005 05 ENQ u0005 Enquiry 006 06 ACK u0006 Positive acknowledge 007 07 BEL u0007 Alert (bell) 008 08 BS u0008 Backspace 009 09 HT u0009 Horizontal tab 010 0A LF u000A Line feed 011 0B VT u000B Vertical tab 012 0C FF u000C Form feed 013 0D CR u000D Carriage return 014 0E SO u000E Shift out 015 0F SI u000F Shift in 016 10 DLE u0010 Data link escape 017 11 DC1 u0011 Device control 1 (XON) 018 12 DC2 u0012 Device control 2 (tape on) 019 13 DC3 u0013 Device control 3 (XOFF) 020 14 DC4 u0014 Device control 4 (tape off) 021 15 NAK u0015 Negative acknowledgement 022 16 SYN u0016 Synchronous idle 023 17 ETB u0017 End of transmission block 024 18 CAN u0018 Cancel 025 19 EM u0019 End of medium 026 1A SUB u001A Substitute 027 1B ESC u001B Escape 028 1C FS u001C File separator (Form separator) 029 1D GS u001D Group separator 030 1E RS u001E Record separator 031 1F US u001F Unit separator 032 20 SP u0020 Space 033 21 ! u0021 Exclamation point (bang) 034 22 ” u0022 Double quote 035 23 # u0023 Hash (number sign, pound sign, sharp) 036 24 $ u0024 Dollar sign (buck) 037 25 % u0025 Percent sign 038 26 & u0026 Ampersand 039 27 ‘ u0027 Apostrophe (single quote) 040 28 ( u0028 Left parenthesis Table continued on following page

A ASCII (Standard) this.length (Web site builder) = aSize; for(var

Friday, August 24th, 2007

A ASCII (Standard) this.length = aSize; for(var index = 0; index Null character 001 01 SOH u0001 Start of header 002 02 STX u0002 Start of text Table continued on following page

JavaScript Programmer’s Reference Array.valueOf() (Method) Returns the contents (Database web hosting)

Thursday, August 23rd, 2007

JavaScript Programmer’s Reference Array.valueOf() (Method) Returns the contents of the array converted to a native primitive value. Availability: JavaScript 1.1 JScript 3.0 Internet Explorer 4.0 Netscape 3.0 Property/method value type: String primitive JavaScript syntax: -myObject.valueOf() The primitive value of the receiving object is returned by this method. Because an array is an aggregation of many elements, a simple type conversion is not appropriate. The individual elements are converted to string values and are then concatenated together and returned as a single string primitive value. This applies even if an array comprises a collection of numeric values. See also: valueOf() Array simulation (Definition) A means of simulating arrays in JavaScript. With a constructor, you can simulate arrays by making them from objects and property components. This may be useful if you want to run an array-based script in a very old JavaScript implementation although these days that likelihood is diminishing rapidly. This was necessary in JavaScript version 1.0. Numbered index locations within an Object object could simulate Array objects. Named items simply allocate the next available numbered entry. Thankfully we don’t have to do this anymore. Warnings: . In Netscape 2.02 and MSIE 3.02 you can operate on existing arrays, but you cannot make a new one. . In Netscape 2.02 the array length value does not work properly. Example code: // Simulate an array with an Object object myArray = new Object(); myArray[0] = “One”; myArray[1] = “Two”; // Simulate an array with a constructor function SimArray(aSize) {

Unlimited web hosting - A Array.unshift() (Method) Array instance A B

Wednesday, August 22nd, 2007

A Array.unshift() (Method) Array instance A B C Array.unshift(”X”) Array instance X A B C 125

JavaScript Programmer’s Reference This operates very like the (Web site counters)

Tuesday, August 21st, 2007

JavaScript Programmer’s Reference This operates very like the Array.push() method except that items are added to the front of the stack rather than the end of the stack. The items are also pushed in reverse order if several are presented at once. That is to say, the order of presentation is preserved within the array. When the push is completed, the item at the front of the array is returned. The number of items that were added increases the array length. If arrays are presented, they will be pushed on as they are and not flattened. When they are subsequently removed from the stack, they will still be arrays. This method modifies the array in place. The result of this method is the new length of the receiving array after the pushed item has been concatenated onto its front. Example code: // Create an array and test the Array.unshift() method myArray = new Array(”AAA”, “BBB”, “CCC”); document.write(”Array
“) displayArrayAsTable(myArray); document.write(”Array.unshift()
“) document.write(myArray.unshift(”XXX”)) document.write(”

“) document.write(”Array after unshift(’XXX’) call
“) displayArrayAsTable(myArray); // Display an array in a table function displayArrayAsTable(anArray) { myLength = anArray.length; document.write(”

“); for(myIndex = 0; myIndex < myLength; myIndex++) { document.write("“); } document.write(”
“); document.write(myIndex); document.write(”“); document.write(anArray[myIndex]); document.write(”


“) } See also: Array.prototype, Array.push(), Array.shift(), Queue manipulation, Stack manipulation Cross-references: ECMA 262 edition 3 section 15.4.4.13

A Array.unshift() (Method) Cross-references: ECMA 262 edition

Monday, August 20th, 2007

A Array.unshift() (Method) Cross-references: ECMA 262 edition 2 section 15.4.4.2 ECMA 262 edition 3 section 15.4.4.2 “A” “B” “C” “D” Array instance 0 1 2 3 “ABCD” “A” “C”"B” “D” Array.unshift() (Method) Push onto a stack whose access is FILO from the start rather than the end. ECMAScript edition 3 JavaScript 1.2 JScript 5.5 Internet Explorer 5.5 Netscape 4.0 Netscape Enterprise Server 3.0 Number primitive -myArray.unshift(someValue, …) someValue A series of values to be pushed onto the stack Availability: Property/method value type: JavaScript syntax: Argument list:

JavaScript Programmer’s (How to cite a web site) Reference Array.toString() (Method) Return a string

Monday, August 20th, 2007

JavaScript Programmer’s Reference Array.toString() (Method) Return a string primitive version of an object. Availability: ECMAScript edition 2 JavaScript 1.1 JScript 3.0 Internet Explorer 4.0 Netscape 3.0 Netscape Enterprise Server 2.0 Opera 3.0 Property/method value type: String primitive JavaScript syntax: -myArray.toString() The elements in the array are converted to strings and are concatenated together to form a larger string. This is functionally identical to using the join() method with no join string argument. If you run the example, it will yield the following: one,2,III This is quite different from what you get if you use the toSource() method, which presents this result: [”one”, 2, “III”] The result of this method is a String primitive version of the array assembled by concatenation. Warnings: . Netscape supports a special conversion mechanism if this method is invoked within a