This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | function triangle(len) { | |
| const arr = []; | |
| let triangleStr = "*"; | |
| for(let i = 0; i < len; i++) { | |
| arr.push(triangleStr); // adds a node to array | |
| triangleStr += " *" | |
| } | |
| return arr.join("\r\n"); | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // Vuex | |
| import Vue from 'vue' | |
| import Vuex from 'vuex' | |
| Vue.use(Vuex) | |
| export default new Vuex.Store({ | |
| state: { | |
| firstName: 'Charlie' | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | using System; | |
| namespace CSharpTuts | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| Human scarlet = new Human("Scarlet", "Johanson", "1984-11-24", 'f'); | |
| Human markus = new Human("Markus", "Aurelius", "2014.12.16"); // obvi it's not his real DOB. | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | using System; | |
| namespace CSharpTuts | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| WriteName("The Dude"); | |
| PrintAge(45); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | using System; | |
| namespace CSharpTuts | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| string firstNum = "47"; | |
| string secondNum = "99"; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | using System; | |
| namespace CSharpTuts | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| // explicit conversion | |
| double doubleNum = 123.3; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // fn() | |
| function digitizeVowels(str) { | |
| return str.split('').map((letter) => { | |
| if(letter.search(/a|e|i|o|u/gi) > -1) { | |
| return letter.replace(/a|e|i|o|u/gi, (Math.random() * 10).toFixed(0) ) | |
| } else { | |
| return letter; | |
| } | |
| }).join(''); | |
| } |