This repository is for basic JavaScript snippets and examples.
constructorArrayLoop.js constructs a function, creates an array, and loops through the array.
forInLoop.js contains For In loop which loops through array(?) "languages" for a typeof equal to string and console.log the matches.
forWhile.js contains For loop to console number 1-10, and While loop to console "hello" while condition is true.
newObject_ConstructorAndLiteral.js [examples] create new object using both Constructor and Literal methods.
oddEven.js determines if Even number using %2, else if no number using isNaN, else odd number.
propertiesAndPassword.js uses Public properties and one private property, with a public function and password requirement to access the private property.
switch_case.js uses prompt to declare a var and is empty for case and default console responses.
switchPrompt.js prompts lunch request and consoles response for each listed case.
typeof.js lists an object, a number, and a string, and uses "typeof" to console.log the type of each.