Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /nfs/c03/h06/mnt/47997/domains/jeffschram.com/html/wp-content/plugins/types/embedded/includes/wpml.php on line 624

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /nfs/c03/h06/mnt/47997/domains/jeffschram.com/html/wp-content/plugins/types/embedded/includes/wpml.php on line 641
Uncategorized | Jeff Schram
Jeff Schram
Projects A/V
Contact About
Project Archive

Uncategorized

April 15, 2018

JeffLearnsReact – Classes


Warning: count(): Parameter must be an array or an object that implements Countable in /nfs/c03/h06/mnt/47997/domains/jeffschram.com/html/wp-content/plugins/workbox-video-from-vimeo-youtube-plugin/workbox_video.php on line 192

Classes are templates that create objects. Class names are usually CapitalCase class Dog { constructor(name) { this.name = name; this.behavior = 0; } } The CLASS calls the CONSTRUCTOR method every time it creates a new INSTANCE of the class. An INSTANCE is an OBJECT that contains the property names and methods of a class, […]

April 13, 2018

JeffLearnsReact – Objects


Warning: count(): Parameter must be an array or an object that implements Countable in /nfs/c03/h06/mnt/47997/domains/jeffschram.com/html/wp-content/plugins/workbox-video-from-vimeo-youtube-plugin/workbox_video.php on line 192

OBJECTS JavaScript objects are containers that can store data and functions. The data we store in an object is not ordered — we can only access it by calling its associated key. const myObj = { thing: ‘value’, another: 2 } Can be accessed w dot notation myObj.thing; // ‘value’ Or bracket notation myObj[‘thing’]; // […]

April 5, 2018

JeffLearnsReact – Flow


Warning: count(): Parameter must be an array or an object that implements Countable in /nfs/c03/h06/mnt/47997/domains/jeffschram.com/html/wp-content/plugins/workbox-video-from-vimeo-youtube-plugin/workbox_video.php on line 192

FLOW Controlling the flow of the execution with if, else if, else, and switch. NOTE: Lines of code between curly braces are called blocks. IF ELSE ELSE IF if/else statements are how programs can process yes/no questions programmatically. SWITCH let groceryItem = ‘papaya’; switch (groceryItem) { case ‘tomato’: console.log(‘Tomatoes are $0.49’); break; case ‘lime’: console.log(‘Limes […]

March 27, 2018

JeffLearnsReact – Iterators


Warning: count(): Parameter must be an array or an object that implements Countable in /nfs/c03/h06/mnt/47997/domains/jeffschram.com/html/wp-content/plugins/workbox-video-from-vimeo-youtube-plugin/workbox_video.php on line 192

Iterators iterate myArray = [‘one’, ‘two’, ‘three’]; .forEach() myArray.forEach(function(myArrayItem) { console.log(myArrayItem); }); myArray.forEach((myArrayItem) => { console.log(myArrayItem); }); .map() Iterates and CHANGES the contents of an array, maps it to another array let numbers = [1, 2, 3, 4, 5]; let bigNumbers = numbers.map(function(number) { return number * 10; }); let numbers = [1, 2, 3, […]

March 26, 2018

JeffLearnsReact – Loops


Warning: count(): Parameter must be an array or an object that implements Countable in /nfs/c03/h06/mnt/47997/domains/jeffschram.com/html/wp-content/plugins/workbox-video-from-vimeo-youtube-plugin/workbox_video.php on line 192

for loops, which let us loop a block of code a known amount of times. let myArray = [‘one’, ‘two’, ‘three’, ‘four’]; for (let i = 0; i<myArray.length; i++) { console.log(myArray[i]); } let i = 0; is the start condition – loop will start at 0 i is the iterator variable i<myArray.length is the stop […]

Posts navigation

← Older posts

Recent Posts

  • JeffLearnsReact – Classes
  • JeffLearnsReact – Objects
  • JeffLearnsReact – Flow
  • JeffLearnsReact – Iterators
  • JeffLearnsReact – Loops

Recent Comments

    Archives

    • April 2018
    • March 2018
    • May 2015
    • April 2015
    • March 2015

    Categories

    • Ducky Moto
    • JeffSchram.com
    • Photography
    • The Moon
    • Uncategorized

    Meta

    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org
    Proudly powered by WordPress