- What value is now stored in the variable name?
var isKing = true;
var name = isKing ? ‘Arthur’ : ‘Hank’;
- What is the difference between == and === in Javascript?
| import m from 'mithril' | |
| import stream from 'mithril/stream' | |
| import { | |
| curry, | |
| compose, | |
| merge, | |
| over, | |
| lensPath, | |
| lift, | |
| pick, |
| var model = { | |
| apiRootUrl: string, | |
| context, | |
| contextRefs: [{ | |
| contextId: string, | |
| type: string, | |
| clientId: string | |
| }], | |
| initialized: boolean, | |
| user: { |
| var contextReadModel = { | |
| type: string, | |
| clientId: string, | |
| contextId: string, | |
| ref: { | |
| type: string, | |
| clientId: string, | |
| contextId: string | |
| }, |
| { | |
| "_links": { | |
| "self": {}, | |
| "context": {} | |
| }, | |
| "timestamp": "string", | |
| "contextIds": [ | |
| "string" | |
| ], | |
| "_embedded": { |
| import m from 'mithril' | |
| import { curry } from 'ramda' | |
| const createActions = ({ update }) => { | |
| return { | |
| someBehavior ({ id }) { | |
| update(m => { m.someId = id }) | |
| } | |
| } | |
| } |
| var fizzBuzzCustom = function(stringOne, stringTwo, numOne, numTwo) { | |
| stringOne = stringOne || 'Fizz'; | |
| stringTwo = stringTwo || 'Buzz'; | |
| numOne = numOne || 3; | |
| numTwo = numTwo || 5; | |
| var ret = [] | |
| for (var i = 1; i <= 100; ++i) { | |
| if (i % numOne === 0 && i % numTwo === 0) { | |
| ret.push(stringOne + stringTwo); |
| <section class="player-bar" ng-controller="PlayerBarCtrl as playerBar"> | |
| <div class="container"> | |
| <div class="control-group main-controls"> | |
| <a class="previous" ng-click="playerBar.songPlayer.previous()"> | |
| <span class="ion-skip-backward"></span> | |
| </a> | |
| <a class="play-pause"> | |
| <span class='ion-play' | |
| ng-show="!playerBar.songPlayer.currentSong.playing" | |
| ng-click="playerBar.songPlayer.play()"> |
| { | |
| context: { clientId: '42', type: 'screen', contextId: '123' }, | |
| threads: { | |
| '888': { commentIds: ['555','556'], createdOn: <date> }, | |
| '999': { commentIds: ['222', '223'], createdOn: <date> }, | |
| }, | |
| metadata: { | |
| '888': { data: '{"some":"data"}', type: 'json' }, | |
| '222': { data: 'some annotation', type: 'string' } | |
| }, |
| var request = { | |
| correlationId: '888', | |
| commands: [{ | |
| command: 'makeComment', | |
| contextId: '123', | |
| text: 'foible', | |
| commentId: '456' | |
| }] | |
| } |