sars 1

sars

var gunshot;
var japa= 'run';

function protest(){
	if (gunshot.IsHeard()){
    	return japa;
       } else {
      	"Do Anything you can do for SARS to end";
      }
 }
 
console.log(protest());

Here is what the above code is Doing:
1. It declares a variable called gunshot and assigns it a value of true.
2. It declares a variable called japa and assigns it a value of ‘run’.
3. It declares a function called protest.
4. It declares an if statement that checks if the gunshot variable is true.
5. If the gunshot variable is true, the if statement returns the value of the japa variable.
6. If the gunshot variable is false, the if statement returns the string “Do Anything you can do for SARS to end”.
7. It calls the protest function and logs the return value to the console.

The protest function returns the value of the japa variable because the gunshot variable is true.

Similar Posts