logo

Crowdly

Дано код: $counter = 0; function increment() {     $counter++;     retur...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Дано код:

$counter = 0;

function increment() {

    $counter++;

    return $counter;

}

echo increment(); 

echo increment(); 

echo $counter;

Питання:

А) Що виведе кожен echo? (вкажіть 3 значення)

Б) Поясніть, чому код працює саме так

В) Як зробити, щоб increment() працював як лічильник (1, 2, 3...)? Опишіть або напишіть код.

More questions like this

Want instant access to all verified answers on moodle.elct.lnu.edu.ua?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!