/**
* @param {String} text
* @param {String} payload
*/
function combinateText(text,payload){
let
first,
firstL,
second,
secondL,
output = ""
if (text.length > payload.length){
first = text
firstL = text.length
second = payload
secondL = payload.length
}else{
first = payload
firstL = payload.length
second = text
secondL = text.length
}
let offset = Math.round(firstL/secondL),
ii = 0
for (let i = 0; i < firstL; i++) {
output += first[i];
if (i % offset == 0){
output += second[ii]
ii += 1
}
}
return output
}
if (num % 2 === 0 && num > 0) {
//return num;
return 2
import time
now = time.time()
...
later = time.time() //какое то другое время
difference = int(later - now)
from datetime import datetime
time1 = datetime.strftime('18 01 2021 12:44:11', '%d %m %Y %H:%M:%S')
time2 = datetime.strftime('19 01 2021 12:45:55', '%d %m %Y %H:%M:%S')
difference = time2 - time1
difference_in_seconds = difference.total_seconds()
button.onclick = e=>{
let count = localStorage["buttonCounter"] || 0;
count += 1
localStorage["buttonCounter"] = count
span.innerText = `вы нажали ${count} раз`
}
button.onclick = e=>{
let count = sessionStorage["buttonCounter"] || 0;
count += 1
sessionStorage["buttonCounter"] = count
span.innerText = `вы нажали ${count} раз`
}
button
, span
- ссылки на элкмент $alls = $conn->query("SELECT COUNT(*) FROM cms_con_ls WHERE status=1");
$row = $alls->fetch_row();
$allso = $row[0];
echo $allso;
window.location.pathname == el.href
document.querySelectorAll('#buttons .nav-link').forEach()
$result = $conn->query($sql);
echo $result;
//=> 12