Binding, Functions and Control Flow - Reading Assignment

1 An Expression is code that returns a value
2 Binding is a way to maintain a value that you will reuse - (But not like in a permanent “Bok” more like you throw a tentacle around it - and it can change while still allowing your refresh to be correct.

3 A collection of bindings (Like those governing how the browser treats JavaScript for example - sort of “always there rules” that apply in a given environment the program is using.

4 A Function is made up of expressions that are manipulated by operators to code a required outcome - Like an alert on a web page requiring used input?

5 Alert “Enter E-mail address”

6 A Side effect is a piece of code that may be altered outside of the scope of the current programme

7 If within the code you write reference to a variable which depends on some other function elsewhere and produces an unexpected output - Say where you code uses a negative value and tries to take the square root of it (from the function in your programme?) returning NAN output instead of an expected integer value?

8 Allows for iteration for while not If Ifelse in an otherwise top to bottom flow of programme execution. Etc,
9 Se above If while then else etc.

Frontend developer
HTML, CSS, Javascript
Backend developer
Backend developer
Ruby, Python

  1. What is an expression?
    An expression is a fragment of code that produces a value.
  2. What is a binding?
    A binding is what JavaScript uses to catch and hold values.
  3. What is an environment?
    The environment is the collection of bindings and their values that exist at a given time.
  4. What is a function?
    A function is a piece of program wrapped in a value.
  5. Give an example of a function.
    console.log
  6. What is a side effect?
    A side effect is any type of change produced by a statement.
  7. Give an example of a function that produces a side effect and another function that produces a value.
    The function “prompt” produces a side effect and the function “Math.max” produces a value.
  8. What is control flow?
    Control flow is the way and the order in which the statements of a program are executed.
  9. What is conditional execution?
    Conditional execution is used when a program has to execute different branches of statements depending on the situation at hand.
  10. What kind of keyword do you need to use to invoke conditional execution?
    To invoke conditional execution you use the “if” keyword.
  1. **Which type of developer programs the code that users interact with directly?
    A: Frontend developer

  2. **In web-development, what languages does a frontend developer typically use?
    A: HTML / CSS / Javascript

  3. **Which type of developer is responsible for making sure the logic of the application runs smoothly?
    A: Backend developer

  4. **Which type of developer is responsible for handling databases?
    A: Backend developer

  5. **Which languages can you use in order to communicate with a database (give 2 examples)?
    A: Python, .net

  1. Which type of developer programs the code that users interact with directly?

client-side / front end dev.

  1. In web-development, what languages does a frontend developer typically use?

HTML, CSS, JS

  1. Which type of developer is responsible for making sure the logic of the application runs smoothly?

server-side/back end dev.

  1. Which type of developer is responsible for handling databases?

server-side/back end dev.

  1. Which languages can you use in order to communicate with a database (give 2 examples)?

MySQL, Oracle

What is an expression?

A fragment of code that produces value.

What is a binding?

To catch and hold values,JavaScript provide binding.

What is an environment?

The collection of bindings and their values hat exist at a given time.

What is a function?

A piece of program wrapped in a value.

Give an example of a function.

Pompt

What is a side effect?

Showing a dialog box or writing to the screen.

Give an example of a function that produces a side effect and another function that produces a value.

Math.min

What is control flow?

When your program more than one statement.

What is conditional execution?

If we want to some code to be executed if and only if.

What kind of keyword do you need to use to invoke conditional execution?

If.

  1. Which type of developer programs the code that users interact with directly?
    Answer: Frontend Developer

  2. In web-development, what languages does a frontend developer typically use?**
    Answer: HTML, CSS, Java Script

  3. Which type of developer is responsible for making sure the logic of the application runs smoothly?**
    Answer: Backend developer

  4. Which type of developer is responsible for handling databases?**
    Answer: Backend developer

  5. Which languages can you use in order to communicate with a database (give 2 examples)?**
    Answer: SQL Server, PostgresSQL

Which type of developer programs the code that users interact with directly?
An UI designer
In web-development, what languages does a frontend developer typically use?
JavaScript, HTML, CSS
Which type of developer is responsible for making sure the logic of the application runs smoothly?
A frontend developer
Which type of developer is responsible for handling databases?
A backend developer (database admin)
Which languages can you use in order to communicate with a database (give 2 examples)?
.Net and Python

  1. Which type of developer programs the code that users interact with directly?
    Front end developer
  2. In web-development, what languages does a frontend developer typically use?
    HTML CSS Javascript
  3. Which type of developer is responsible for making sure the logic of the application runs smoothly?
    Back end developer
  4. Which type of developer is responsible for handling databases?
    Back end developer
  5. Which languages can you use in order to communicate with a database (give 2 examples)?
    PHP Ruby

1- what is a statement?
A statement is a piece of code that returns a value.

2- What is a binding?
A binding is a way to grap and an entity. Other name of it a variable.

3- What an envirement?
An envirement is a collection of bindings and its values.

4- What is a function?
A function is a piece of code that wrapped in a value, when it is called it let
those program run.

5- Give examples of functions.
prompt(), console.log()

6- What is a side effect?
A side effect is the ability to display something on a screen when a function is called.

7- Give an example of a function that gives a side effect and another function that give a value
function that gives a side efect is ie. console.log(“Hello word”)
function that return a value is console.log(Math.min(2,3)+1)

8- What is a control flow?
A control flow is when excecuting a program is runs from top to bottom.

9- What a conditional control flow?
a conditional control flow is the flow of program that can be modified with conditions like the
keyword “if”

10- what kind of keyword do you need to use to invoke a condition control flow?
The “if” keyword.

  1. Which type of developer programs the code that users interact with directly?
    Ans: Front-end developer
  2. In web-development, what languages does a frontend developer typically use?
    Ans: HTML, CSS, and JavaScript
  3. Which type of developer is responsible for making sure the logic of the application runs smoothly?
    Ans: Backend developer
  4. Which type of developer is responsible for handling databases?
    Ans: Backend developer
  5. Which languages can you use in order to communicate with a database (give 2 examples)?
    Ans: MySql, Oracle, Python…

What is an expression?

  • A fragment of code that produces a value is called an expression

What is binding?

  • To catch and hold values, JavaScript provides a thing called a binding or variable
  • A binding do not contain values; they grasp them.

What is an environment?

  • The collection of bindings and their values that exist at a given time is called the environment.

What is a function?

  • A function is a piece of program wrapped in a value.
  • Such values can be applied in order to run the wrapped program

Give an example of a function?

  • Example: prompt(“Enter passcode”);

What is a side effect?

  • Showing a dialog box or writing text to the screen is a side effect.
  • A lot of functions are useful because of the side effects they produce.

Give an example of a function that produces a side effect and another function that produces a value?

  • Example that produces a side effect: prompt(“Enter passcode”);
  • Example that produces a value console.log(Math.max(2, 4));

What is control flow?

  • When your program contains more than one statement, the statements are executed as if they are a story, from top to bottom.

What is conditional execution?

  • Not all programs are straight roads. We may, for example, want to create a branching road, where the program takes the proper branch based on the situation at hand.

What kind of keyword do you need to use to invoke conditional execution?

  • Conditional execution is created with the if keyword in JavaScript
  1. Which type of developer programs the code that users interact with directly?
    Frontend
  2. In web-development, what languages does a frontend developer typically use?
    HTML, CSS and Javascript
  3. Which type of developer is responsible for making sure the logic of the application runs smoothly?
    Backend
  4. Which type of developer is responsible for handling databases?
    Backend
  5. Which languages can you use in order to communicate with a database (give 2 examples)?
    Ruby, PHP, Java, .Net, and Python

1. Which type of developer programs the code that users interact with directly?
Frontend
2. In web-development, what languages does a frontend developer typically use?
HTML, CSS, JavaScript
3. Which type of developer is responsible for making sure the logic of the application runs smoothly?
Backend.
4. Which type of developer is responsible for handling databases?
Backend
5. Which languages can you use in order to communicate with a database (give 2 examples)?
Java, PHP, Ruby, .Net

  1. What is an expression?

An expression is any fragment of code that generates a value.

  1. What is a binding?

A binding is basically a variable that allows to capture value.

  1. What is an environment?

It is a collection of bindings and their values at any existing time.

  1. What is a function?

A function is a piece of program that is wrapped in a value. Such values can be applied to run a wrapped program.

  1. Give an example of a function.

prompt(“EnterPasscode”)

  1. What is a side effect?

A change that occurs because a previous statement changed the state of the machine.

  1. Give an example of a function that produces a side effect and another function that produces a value.

I’m not sure. I assume that a function that produces a side effect would be like var a = 1, or anything prompts a user response like (alert). Anything that produces a value would be just like typing in something like 1;? Not sure lol.

  1. What is control flow?

It’s the story of your code, from top to bottom, in a left-right linear fashion.

  1. What is conditional execution?

Condition execution creates a logic tree using IF.

  1. What kind of keyword do you need to use to invoke conditional execution?

You must use IF.

  1. What is an expression?
    a piece of code that generate a value. Expressions can also be nested.

  2. What is a binding?
    The same as a variable. You store a value behind the variable namn that you can use later.

  3. What is an environment?
    The collection of bindings

  4. What is a function?
    A module of code that process the value of different variables and complete a specifik task.

  5. Give an example of a function.
    function myNumber(10) {
    if (MyNumber == “10”) {
    return true;
    } else {
    return false;
    }
    }

  6. What is a side effect?
    written text on the screen or a dialog box

  7. Give an example of a function that produces a side effect and another function that produces a value.
    promt(“this will open a dialog box”)
    console.log(Math.max(100,99));

  8. What is control flow?
    The order of statements evaluated in a program. For example…
    Statement 1 - A dialog box opens and ask the user for a number
    Statement 2 - Shows the answer
    Statement 3 - Ask the next question to the user etc…

  9. What is conditional execution?
    You set conditions that decide if the code will be executed or not. You can check so names and keyword are correct. You can control that numbers are written in a phonnr box and not text etc…

  10. What kind of keyword do you need to use to invoke conditional execution?
    You use IF and i can follows of THEN, OR, ELSE, AND, WHILE.

  1. A fragment of code that produces a value is called an expression.
  2. Something java script uses to catch and hold values.
  3. A collection of bindings and their values that exist at a given time
  4. A piece of program wrapped in a value.
  5. prompt(“Enter your name”);
  6. A statement or function that modifies the state of something else (outside its own scope), then it is
    producing a side effect.
  7. prompt(“Enter your name”);
    console.log(Math.max(2, 4));
  8. Control flow is the order in which a program will execute the code.
    9.conditional execution means that a condition is only executed when it meets predefined condition
  9. if, if else, while, loop, true/false

I like this answer, very concise and helpful.

  1. Which type of developer programs the code that users interact with directly?
    UI developer, or Front-end developer
  2. In web-development, what languages does a frontend developer typically use?
    HTML, CSS and Javascript
  3. Which type of developer is responsible for making sure the logic of the application runs smoothly?
    A Back-end developer develops tools with the functionality needed, but ultimately, the front-end developer calls the right functions to put the functionality together to satisfy the customer. I think the Front-end developer is the best answer.
  4. Which type of developer is responsible for handling databases?
    A DB developer, or the Back-end developer
  5. Which languages can you use in order to communicate with a database (give 2 examples)?
    Ruby, PHP, Java, .Net, and Python

** 1. What is an expression?
Typically a line of code in Javascript that returns a value

  1. What is a binding?
    Pointer to a value.

  2. What is an environment?
    The collection of bindings on a page.

  3. What is a function?
    A piece of the program, wrapped in a value.

  4. Give an example of a function.
    This function returns the value of a+b
    function Total(a,b) {
    return a+b;
    }

  5. What is a side effect?
    Something that affects the world (envronment) in a tangible way.

  6. Give an example of a function that produces a side effect and another function that produces a value.
    Simple statements don’t alter any state;
    1=1;
    true;

but if we want something to change, we would
let a = 1;
let b = 1;
These change the value of something in the environment, so they are side effects.

  1. What is control flow?
    The order in which things are executed

  2. What is conditional execution?
    an if/then that controls if something happens or not.

  3. What kind of keyword do you need to use to invoke conditional execution?**
    if