Skip to content

Instantly share code, notes, and snippets.

View Shruubi's full-sized avatar

Damon Swayn Shruubi

View GitHub Profile
@Shruubi
Shruubi / ExampleWidget.jsx
Created November 6, 2016 23:59
Example es6 react
//import the react library
import * as React from "react";
//ExampleWidget inherits functionality of React.Component
//we also need to export default to make this widget available
//to the rest of our app
export default class ExampleWidget extends React.Component {
//constructor is called when the widget is created
constructor(props) {
walls = [2,5,1,3,1,2,1,7,7,6]
lmax = 0
rmax = 0
total = 0
#find rmax
for i in range(0, len(walls)):
if walls[i] > walls[rmax]:
rmax = i