JavaScript: Iterating over a string
Instructions
Loading...
Your exercise will be checked with these tests:
// @ts-check
import { expect, test, vi } from 'vitest'
import f from './index.js';
test('hello world', async () => {
const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => { });
f('Hexlet')
const firstArg = consoleLogSpy.mock.calls.join('\n');
expect(firstArg).toBe('t\ne\nl\nx\ne\nH')
})
Teacher's solution will be available in:
20:00
