Coder Social home page Coder Social logo

methodsandscopeshuiswerk's Introduction

Opdracht beschrijving

Deze opdracht bestaat uit meerdere opdrachtjes om met functies, scope en for-loops te kunnen oefenen. Om de opdracht te maken kun je de opdracht clonen of downloaden naar jouw eigen computer.

Dit project bevat de volgende bestanden:

  1. functions-methods.js
  2. functions-and-scope.js

Zorg ervoor dat je de functies altijd een waarde laat teruggeven. Dit log je vervolgens in de console.

Dus niet:

function example() {
  console.log('Hallo!');
}

example();

Maar wel zo:

function example() {
  return 'Hallo!';
}

// OF we loggen wat er terugkomt uit de functie in de console
console.log(example());

// OF je slaat de uitkomst op in een variabele en stopt dát in de console.log():
const outcome = example();
console.log(outcome);

Script runnen

Als je de code wil runnen kun je dit doen door het volgende in de terminal in te voeren:

nodemon functions-methods.js

Als je wisselt van bestand moet je nodemon eerst stoppen (ctrl + c voor zowel Windows als Mac) en dan opnieuw starten met de nieuwe bestandsnaam, zoals bijvoorbeeld:

nodemon functions-and-scope.js

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.