code.ashish.me

Atom feed

Recently added: 128 Longest Consecutive Sequence, 347 Top K Frequent Elements, 045 Jump Game 2, 228 Summary Ranges, 219 Contains Duplicate 2

01 Find Area Of Circle

function areaOfCircle(radius) {
  return 3.14 * radius ** 2;
}

test('area of circle', () => {
  expect(areaOfCircle(1)).toEqual(3.14);
});

Created 2019-11-24T04:53:20+05:30, updated 2019-11-27T02:02:47+05:30 · History · Edit