Download presentation
Presentation is loading. Please wait.
Published byBasil Walton Modified over 9 years ago
2
How do you represent a number with no value? Mathematicians defined the “number” 0 (zero) How do we represent a string with no value? Use an empty string What is an empty string? String of length zero Defined as “” Open and close quote with no characters between Often used to initialize a string variable that will be used later 2Programming Part IV
3
Two string-related functions for dealing with ASCII values .charCodeAt(i) Returns the ASCII value for the character at index i Returns the ASCII value as a Number (decimal) “abcd”.charCodeAt(2) → 99 (ASCII value for “c”) String.fromCharCode(i) Returns a single-character string Character is the ASCII character at code i Character code can be in decimal or hex String.fromCharCode(99) → “c” String.fromCharCode(0x63) → “c” (99 = 0x63) 3Programming Part IV
4
Random password generator Lowercase conversion 4Programming Part IV
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.