peterschussheim
9/4/2016 - 4:18 PM

Persistence of a number

Persistence of a number

import React from 'react'
class YOLOWidget extends React.Component {
    static title = '#YOLO'
    static match(value, ast){
        return value === '#YOLO'
    }
    render(){
        return <a href="https://en.wikipedia.org/wiki/YOLO_(motto)">
            https://en.wikipedia.org/wiki/YOLO_(motto)
        </a>
    }
}

// doc.kernel.widgets.push(YOLOWidget)

YOLOWidget
function persistence(num) {
	// base case: if num.length === 1, return 0
  console.log(num.length)
}

Persistence of a number

This Gist was automatically created by Carbide, a free online programming environment.

You can view a live, interactive version of this Gist here.