Dilettante_Pro,
К этому пункту я уже сам написал .Мне 2 других интересуют
ВОТ код к 1
const alphabet = "qwertyuiop[]asdfghjkl;\'zxcvbnm,.\/";
function addKeyboardLayout(alphabet) {
let keyboardRows = [],
keyboardSymbols = alphabet.split(""),
firstRow = keyboardSymbols.slice(0, keyboardSymbols.indexOf('a')),
secondRow = keyboardSymbols.slice(keyboardSymbols.indexOf('a') , keyboardSymbols.indexOf('z')),
thirdRow = keyboardSymbols.slice(keyboardSymbols.indexOf('z') );
keyboardRows.push(firstRow);
keyboardRows.push(secondRow);
keyboardRows.push(thirdRow);
return keyboardRows;
}
|