Typescript: Null и Undefined
Задание
Полезное
Loading...
Ваше упражнение проверяется по этим тестам
import { expect, test } from 'vitest'
import formatPrice from './index';
test('formatPrice', () => {
expect(formatPrice()).toBe('$0.00');
expect(formatPrice(null)).toBe('$0.00');
expect(formatPrice(200)).toBe('$200.00');
expect(formatPrice(3.145)).toBe('$3.15');
});
Решение учителя откроется через:
20:00
