--- id: 56533eb9ac21ba0edf2244d6 title: Comparison with the Less Than Operator challengeType: 1 videoUrl: '' localeTitle: Сравнение с Менеджером оператора --- ## Description
Менее чем оператор ( < ) сравнивает значения двух чисел. Если число слева меньше числа справа, оно возвращает true . В противном случае возвращается false . Как и оператор равенства, меньше, чем оператор, преобразует типы данных при сравнении. Примеры
2 <5 // true
'3' <7 // true
5 <5 // false
3 <2 // false
'8' <4 // false
## Instructions
Добавьте less than операторов к указанным линиям так, чтобы операторы return имели смысл.
## Tests
```yml tests: - text: testLessThan(0) должен вернуть «Менее 25» testString: 'assert(testLessThan(0) === "Under 25", "testLessThan(0) should return "Under 25"");' - text: 'testLessThan(24) должен вернуть «Менее 25 лет»,' testString: 'assert(testLessThan(24) === "Under 25", "testLessThan(24) should return "Under 25"");' - text: 'testLessThan(25) должен вернуть «Менее 55»,' testString: 'assert(testLessThan(25) === "Under 55", "testLessThan(25) should return "Under 55"");' - text: testLessThan(54) должен вернуть «Менее 55» testString: 'assert(testLessThan(54) === "Under 55", "testLessThan(54) should return "Under 55"");' - text: 'testLessThan(55) должен возвращать «55 или более»,' testString: 'assert(testLessThan(55) === "55 or Over", "testLessThan(55) should return "55 or Over"");' - text: 'testLessThan(99) должен возвращать «55 или более»,' testString: 'assert(testLessThan(99) === "55 or Over", "testLessThan(99) should return "55 or Over"");' - text: Вы должны использовать оператор < по крайней мере дважды testString: 'assert(code.match(/val\s*<\s*("|")*\d+("|")*/g).length > 1, "You should use the < operator at least twice");' ```
## Challenge Seed
```js function testLessThan(val) { if (val) { // Change this line return "Under 25"; } if (val) { // Change this line return "Under 55"; } return "55 or Over"; } // Change this value to test testLessThan(10); ```
## Solution
```js // solution required ```