##Telegraph prep part 1 self-assessment This is solo work do not ask others for help
###String: 'Javascript is super duper awesome' ###Object: myProfileObject = {}; ###Array: javaScriptArray = ['J', 'a', 'v', 'a'];
####1. Print to the Javascript console the 5th letter in a string (no variables allowed)
####2. Loop through a string and print each character to the Javascript console (the only variable allowed is the iterator)
####3. Copy and refactor problem 2 using a while
loop
####4. Add the following key values pairs to the myProfileObject
object:
- 'school' set to 'Telegraph Prep'
- 'location' set to 'Berkeley, California'
- 'name' set to your name
NOTE: Explain the method you are using to do this (hint: '_____ notation')
####5. Create a function that takes an object and a name as parameters. It should return a new object with ONLY these properties:
- Your first and last name ex:
name
:'Bobby Tables'
- Your
place of birth
: city, state (or equivalent), country - Your
hobby
or favorite activity - A method that prints: 'My first name is [first name]' and my last name is '[last name]'
**NOTE: Test your function. (1) Print what your function returns in the console. (2) Invoke the method and check that it logs the intended phrase.
####6. Create a function that takes a name as an parameter and returns true
if it is equivalent to the name
property returned from the function call above.
####7. Create a function that takes an object as a parameter and returns the length
of the object.
####8. Create a function that modifies the javaScriptArray
to be ['J', 'a', 'v', 'a', 'S', 'c', 'r', 'i', 'p', 't']
####9. Create a function that takes in the javaScriptArray
array and returns a NEW array with value ['JavaScript']
Must include:
- pseudocode
- proper indentation '2 spaces' not tabs
- Remove and unnecessary
console.log
statements
##Algorithm Design
- Define the rules of the problem
- Determine any constraints
- Explore the problem and discover techniques or patterns that might be useful
- Generate a simple plan that solves the problem
- Turn that plan into steps- put your pseudocode skills to use!