[phpBB Debug] PHP Warning: in file [ROOT]/ext/dmzx/ultimatepoints/event/listener.php on line 438: Trying to access array offset on value of type bool
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4626: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3358)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4626: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3358)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4626: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3358)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4626: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3358)
DIXI-Servers • Лесна функция за JavaScript [Калкулатор]
Page 1 of 1

Лесна функция за JavaScript [Калкулатор]

Posted: Tue Jun 09, 2020 10:51 am
by Dixiklo.
Simple функция, разгледайте кое как става:

Code: Select all

function calc(input) {
    let a = Number(input);
    let b = Number(input);
    
    let result = a + b
    console.log(result)
}

(И съответно си викате функцията с calc("ПАРАМЕТРИТЕ");)