VLawGz ('-' * 6)
A Pen by Captain Anonymous on CodePen.
def solution(a) | |
total = a.size | |
lindex = a.size-1 | |
sorted = a.sort | |
min = total | |
combos = [] | |
return 0 if a == sorted | |
(2..total).each do |pair_size| |
let myLib = (function(){ | |
this.libName = 'in lib'; | |
let obj = { | |
libName: 'in obj', | |
toCaps() { | |
return this.libName.toUpperCase(); | |
} | |
}; |
class Watcher { | |
constructor(vm, valueFn) { | |
this.vm = vm; | |
this.getter = valueFn; | |
this.value = this.get(); | |
} | |
get() { | |
let value; |
const Watcher = require('./watcher'); | |
const noop = function () {}; | |
const sharedPropDef = { | |
enumerable: true, | |
configurable: true, | |
get: noop, | |
set: noop | |
}; |
// https://vuejs.org/v2/guide/instance.html | |
// | |
// | |
//function Vue(opts){ | |
//for(var key in opts.data){ | |
//this[key] = opts.data[key] | |
//} | |
//} | |
function Vue(opts){ | |
this._data = opts.data; |
class XMLBuilder | |
def initialize | |
@d = {} | |
end | |
def to_xml | |
@d | |
end |
// this is function definition. | |
// you can make a function take zero or more arguments (also called as parameters) | |
// This Dog fn takes one argument: 'name' | |
function Dog(name){ | |
return "hello, my name is: " + name; | |
} | |
// calling the Dog function | |
Dog('tommy'); // this will return "hello, my name is: tommy" |
VLawGz ('-' * 6)
A Pen by Captain Anonymous on CodePen.
A Pen by Prasanna N on CodePen.
A Pen by Prasanna N on CodePen.