List your top 5 skills before an interview.
- e.g. debugging
- Ruby models
- CSS frameworks
Why is it a skill? Examples please. So important to be able to provide evidence of why it's a skill.
| // The Fortune Teller | |
| // Why pay a fortune teller when you can just program your fortune yourself? | |
| // Store the following into variables: number of children, partner's name, geographic location, job title. | |
| // Output your fortune to the screen like so: "You will be a X in Y, and married to Z with N kids." | |
| var children = Math.random() * 10; | |
| var partnerName = Math.random() * 10; | |
| var geoLocation = Math.random() * 10; |
| // https://gist.github.com/epoch/309e4a021cd06f8ae32b#file-js-day2-else-if-md | |
| console.log('date.js is alive'); | |
| var n = new Date(); | |
| var year = n.getFullYear(); | |
| if (year === 2015) { | |
| console.log('Im in the present'); | |
| } |
| require 'pry' | |
| class Phone | |
| def initialize(number) | |
| @number = number.gsub(/\D/,'') | |
| end | |
| def number |
| var states = { | |
| "VIC": {lat: -36.5185827, lng: 140.978258}, | |
| "SA": {lat: -31.9495406, lng: 130.5079709}, | |
| "NSW": {lat: -32.7503099, lng: 142.8255387}, | |
| "WA": {lat: 24.1709455, lng: 111.9329231}, | |
| "NT": {lat: -18.247301, lng: 124.4607377}, | |
| "QLD": {lat: -19.3313579, lng: 136.7358599}, | |
| "ACT": {lat: -35.5212255, lng: 148.5212304} | |
| }; |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>JS Revision</title> | |
| </head> | |
| <body> | |
| <h1>REPS</h1> | |
| <script src="underscore.js" charset="utf-8"></script> | |
| <script src="reps.js" charset="utf-8"></script> |
| var data = [15,3,20]; | |
| // accumulator is the item of the array state last time it fired. | |
| var reducer = function(accumulator, item) { | |
| console.log(accumulator); | |
| console.log(item) | |
| return accumulator + item; | |
| }; |
To be able to debug & reload for node apps (e.g. express), here are some steps:
npm install -g nodemon
npm install -g node-inspector
node app.js, you can now run nodemon app.js and it will restart the app on change.nodemon --debug app.js. Then start node-inspector node-inspector.localhost URL provided by node-inspector to view your app in the console.debugger statement in your code. When you refresh your browser (on your app process), node-inspector will break at that point and allow you to debug.Do a blog post on this, as it’s so annoying to re-remember!
1 Set up libraries & dependencies
Set up blank project folder:
| const avengers = ['Natasha Romanoff', 'Tony Stark', 'Steve Rogers']; | |
| const ['blackWidow', ...theOthers] = avengers; | |
| // blackWidow = 'Natasha Romanoff | |
| // theOthers = ['Tony Stark', 'Steve Rogers'] |