JSFiddle - React, Tailwind, and code Playground

by Serge Zahharenko

JavaScript

var something = 10, somethingElse = 20;
function buffer(i){
    var num1 = thing(i).x * something;
    var num2 = thing(i).y * somethingElse;
    return [num1, num2];
}

function thing(i){
    return {x: i*10,y:i*1.5};
}

//get needed value
buffer(20);
alert(buffer(20))