Answer the question
In order to leave comments, you need to log in
Requirements for Super Jun frontend?
I study at the 3rd course, Information security. Not so long ago I was interviewed for the position of junior react developer. They offered to work. But after thinking it over again, I decided to give up the job. I think that I will not be able to combine my studies at the university, the military department and work. Perhaps a remote worker would be ideal, but who needs a remote person with zero commercial experience. Thus, I have another unemployed year. I plan to get to super-joon, but I don’t know what is the best thing to do to become one. I focus on solving problems, studying algorithms and data structures. But is it right? What do you think a super-junior frontend should be like so that he clearly stands out from the crowd of other juniors?
Answer the question
In order to leave comments, you need to log in
I focus on solving problems, studying algorithms and data structures. But is it right?
console.log("2, 3, 5, 7, 11")
function GetNumbers(n){
var nums = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199];
return nums.slice(0, Math.max( 0, Math.min(n, nums.length) ) ).join(', ');
}
var userNumber = 10; // число полученое от пользователя
var list = new Array;
nextPrime:
for (var i = 2; i <= 1000; i++) {
for (var j = 2; j < i; j++) {
if (i % j == 0) continue nextPrime;
}
list.push(i);
}
var string = '';
if(userNumber > 0) {
for (var i = 0; i < userNumber; i++) {
string = string + list[i] + ', ';
}
}
var result = string.substring(0, string.length - 2);
console.log(result);
// Получаем количество чисел которые нам надо вывести
var count = window.prompt('Please enter number.', 0);
// Определяем базовое число
var currentNumber = 2;
//Продолжаем цикл до тех пор пока количество требуемых для отображения чисел не достигнет нуля
while(count != 0) {
if(isNatural(currentNumber)) {
console.log(currentNumber);
count--;
}
currentNumber++;
}
// Определяем функцию которая проверяет натурайное ли число или нет
function isNatural(number) {
for (var i = 2; i <= number/2; i++) {
if (number % i == 0) {
return false;
}
}
return true;
}
Here is the complete solution according to the TOR
var n = prompt('Введите число если вы пользователь');
document.write('2, 3, 5, 7, 11');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question