const xxx = str => Array
.from(str, (n, i) => n.toUpperCase() + n.toLowerCase().repeat(i))
.join('-');
const xxx = str => str
.toUpperCase()
.split('')
.reduce((acc, n, i) => `${acc}${i ? '-' : ''}${n}${Array(-~i).join(n.toLowerCase())}`, '');
const xxx = str => str
.toUpperCase()
.replace(/(?<=.)./g, (m, i) => '-'.concat(m, ...Array(i).fill(m.toLowerCase())));
<img>
, <input type="text">
, <input type="email">
, <input type="password">
, <input type="datetime">
, etc. <div class="inputbox">
<input type="text">
</div>
.inputbox::after {
/* ...стили для псевдоэлемента */
}
или задать несколько "неловких" вопросов тимлиду?
я пробывал разные варианты, пожалуйста, не судите строгов истории вопросов вижу у вас вопросы по реакту и жс, и по этому слегка странно видеть такой гигантский провал в знаниях по банальной хтмл разметке...
Но вылазит то один баг, то другой. Уже нервишки здают...
Есть ли хорошие конвертеры из jquery в js?
'password,
$stmt = mysqli_prepare($connect, "INSERT INTO `bd` (`id`, `name`, `tel`) VALUES (NULL, ?, ?)");
mysqli_stmt_execute($stmt, [$_POST['name'], $_POST['tel']]);
function prepared_query($mysqli, $sql, $params, $types = "")
{
$types = $types ?: str_repeat("s", count($params));
$stmt = $mysqli->prepare($sql);
$stmt->bind_param($types, ...$params);
$stmt->execute();
return $stmt;
}
$sql = "INSERT INTO `bd` (`name`, `tel`) VALUES (?,?)";
prepared_query($connect, $sql, [$_POST['name'], $_POST['tel']]);
elem
, изменится и его «оригинал» – элемент массива. Но нет. Число возвели в квадрат, но в массиве всё осталось по-прежнему.elem
не числом, а объектом, трюк сработал бы. let arr = [ {x: 1}, {x: 2}, {x: 3}, {x: 4}, {x: 5} ];
for (let elem of arr) {
elem.x = elem.x ** 2;
}
// [ {"x": 1}, {"x": 4}, {"x": 9}, {"x": 16}, {"x": 25} ]