CS2513: Client-Side Programming
Weekly Course Content - Week 11
Chapter 8: Manipulating Data in Strings and Arrays
Chapter 8: Manipulating Data in Strings and Arrays
- Manipulate strings with properties and methods of the String object
- Create regular expressions and use them to validate user input
- Manipulate arrays with properties and methods of the Array object
- Convert between strings and arrays, and between strings and JSON
JavaScript //Sixth Edition by Sasha Vodnik and Don Gosselin
Chapter 8: Manipulating Data in Strings and Arrays
Required Class Coding Standards
http://www.occc.edu/aphilipp/htm_csp/CS2513_CodingStandards.htm
JSON Tutorials
- JavaScript JSON Programming by Adam Khoury
I realize that these videos are a bit long. If you have time or need clarification, you might want to view or scan through them.
JSON Programming Tutorial 1 (16:09 min)
https://www.developphp.com/video/JavaScript/JSON-Tutorial-for-Beginners-Learn-How-to-Program
- What is JSON? by Codesource
Want to know more about JSON? Check out this four video series!https://www.youtube.com/playlist?list=PLfdtiltiRHWHKQOby9HEyYtB_Y9g7z6yL
- What is JSON
- Introduction (4:22 min)
- Linting (1:38 min) Note: A site for linting" can be found at http://www.jslint.com/
- Parsing (3:53 min) Note: This video might be more relevant in conjunction with the AJAX chapter.
- Stringify (2:35 min)
" Lint is the name originally given to a particular program that flagged some suspicious and non-portable constructs (likely to be bugs) in language source code. The term is now applied generically to tools that flag suspicious usage in software written in any computer language.
Completed sample code from Chapter 08 JS6eTextCode_Chapter08
Download the zip file and extract it.
- PowerPoint from Text: CS2513GosselinJS_CH08 - View (ppt) | Print (pdf)
- You might want to bookmark these references for future use.
- Strings: http://www.w3schools.com/jsref/jsref_obj_string.asp (W3Schools)
- Arrays: http://www.w3schools.com/jsref/jsref_obj_array.asp (W3Schools)
- Regular Expressions:
- http://www.w3schools.com/js/js_regexp.asp (W3Schools)
- http://regexr.com/ (Test Regular Expressions online)
- http://www.cheatography.com/davechild/cheat-sheets/regular-expressions (REGEX Cheat Sheet)
Same software as previously indicated.
Chapter Review Questions
Source for quiz and test questions. It is highly recommended that students know the answers.
Chapter 8: Review Questions (.rtf file)
Test 4: Review Sheet
CSP08 - Strings and Arrays: Specifications
(Complete, upload to Apollo1, then submit URL in the LMS)
Weekly Quiz: Chapter 8 (Located in the LMS)