Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

Functions & Exec Context makePlans

So I managed to put 


    let friendsAvailable = true;

function makePlans(name) {
  // INSERT CODE HERE

  return callFriend(friendsAvailable, name);
            
}

function callFriend(bool, name) {
  // INSERT CODE HERE  
  if (bool) {
    return (`Plans made with ${name} this weekend`);
  } else  {
    return "Everyone is busy this weekend";
  }
}

// Uncomment these to check your work!
console.log(makePlans("Mary")) // should return: "Plans made with Mary this 
weekend'
friendsAvailable = false;
console.log(makePlans("James")) //should return: "Everyone is busy this weekend."
Comment

PREVIOUS NEXT
Code Example
Javascript :: jquery-3.2.1.min.js file download 
Javascript :: Javascript - The file size is measured in bytes 
Javascript :: javascript remove files name starts with 
Javascript :: react avoid spreading non-dom props across component 
Javascript :: javascript get token from query string 
Javascript :: react 5 to 10 rating 
Javascript :: Refresh a kendo ui widget, when options on AngularJS $scope change 
Javascript :: provider not found react 
Javascript :: js array equals ignore order 
Javascript :: vue js key modifiers 
Javascript :: javascript csv einlesen-jqueryAjax 
Javascript :: js video controls false 
Javascript :: atomic design with redux 
Javascript :: Cannot GET /public/staffRegister in node.js 
Javascript :: swift read json from url 
Javascript :: javascript random function 
Javascript :: khai bao bien trong javascript 
Javascript :: Datatable search input with no label - just the placeholder 
Javascript :: how to set up click event listeners javascript 
Javascript :: how to check if jquery element is loaded 
Javascript :: React Hook "useState" is called in function "cardState" which is neither a React function component or a custom React Hook function 
Javascript :: node load testing-01 
Javascript :: for await range javascript 
Javascript :: javascript YUP utilisation to math certain disire in forms 
Javascript :: online js to typescript converter 
Javascript :: Ajax wait until success 
Javascript :: firebase check if key exists javascript 
Javascript :: release mouse key javascript 
Javascript :: next/image working without setting domain 
Javascript :: Replacing If Else Chains with Switch 
ADD CONTENT
Topic
Content
Source link
Name
6+1 =