JSFiddle - React, Tailwind, and code Playground

JavaScript

var a = "3/2";
var split = a.split('/');
var result = parseInt(split[0], 10) / parseInt(split[1], 10);
alert(result);