JSFiddle - React, Tailwind, and code Playground

by jfroom

CoffeeScript

a = [
     '10+2'
     '10++2'
     '10-2'
     '10--2'
     '10+-2'
     '10-+2'
     '10+/2'
     '10/2'
     '10//2'
     '10*2'
     '10**2'
     '10/*2'
     '10*+2'
     
     ]
for s in a
    try
        x = eval(s)
    catch e
        x = 'NaN'
    $('body').append($("<p>#{s} = #{x}</p>"))