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)
}
This Gist was automatically created by Carbide, a free online programming environment.