- An expression is a fragment of code that produces a value.
- A binding is a keyword such as var, let, or const, that holds a value and keep them from dissipating.
- An environment is the collection of values and bindings that exist at a given time.
- Function is a piece of program that is wrapped in a value.
- prompt
- A side effect are the outputs of function, for example a side effect could be a dialog box or writing text to a screen.
- the alert() function will produce a dialog box that will pop up at the top of the screen. the console.log function will keep all side effect inside the console.
- Control flow is the order in which programs or statements are executed. From top to bottom.
- Conditional executions are codes that are only executed if a certain need or condition is met.
- The keyword that is needed to invoke a conditional execution is if()
1.Anything that produces a value is an expression in JavaScript
2.A binding or āvariableā holds and catches a value. Binding is assigning values to variables. The keyword āletā defines a binding followed by the name of the binding; in order to give it value we add an operator ā=ā and an expression
3.The collection of bindings and their values that exist at a given time is called āenvironmentā
4.A function is a set of statements that performs a task or calculate a value; Functions allow you to define code once and use it many times. You can use the same code many times with different arguments to produce different results. A function is defined by the keyword āFunctionā, followed by a ānameā, followed by the parameters (), followed by the body of the function (code) {}
5. Function greeting () {
Console.log (āhello everyoneā);
}
6.Showing a dialogue box or writing text to the screen is a āside effectā
7. ?
8. If a program contains multiple functions, the functions are executed from top to bottom
9.If we need our program to execute code if a certain condition holds.
10.We create a conditional execution with the keyword āifā
-
What is an expression?
A fragment of code that produces a value is called an expression.
The simplest fragment is a statement. -
What is a binding?
It is a statement that temporarily holds a value -
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 JavaScript procedureāa set of statements that performs a task or calculates a value.It is like a reusable piece of code. You can
call a function by putting parentheses () after an expression that produces a
function value. prompt(blahblah); or alert(blah blah). However most functions will contain blocks. that are shown with {} . blocks are a group of statments that should be run together -
Give an example of a function.
loops, count numbers up to 100, pop up windows
let theNumber = Number(prompt(āPick a numberā));
if (!Number.isNaN(theNumber)) {
console.log("Your number is the square root of " +
theNumber * theNumber);
}
-
What is a side effect?
Is what happens when you run your code and something happens. - Give an example of a function that produces a side effect and another function that produces a value.
-
What is control flow?
Its the direction the program takes when our statements get resolved to true or false.
let num = Number(prompt(āPick a numberā));
if (num < 10) {
console.log(āSmallā);
} else if (num < 100) {
console.log(āMediumā);
} else {
console.log(āLargeā);
} -
What is conditional execution?
only execute the statement or function if something else happens like in the above example
- Use if to specify a block of code to be executed, if a specified condition is true
- Use else to specify a block of code to be executed, if the same condition is false
- Use else if to specify a new condition to test, if the first condition is false
- Use switch to specify many alternative blocks of code to be executed
-
What kind of keyword do you need to use to invoke conditional execution?
if, else, else if, switch
- What is an expression?
- A fragment of code that produces a value is called an expression. Every value that is written literally is an expression.
- What is a binding?
- A special keyword that catches and holds values in the JS console. Bindings do not contain values. They grasp them, so two bindings can refer to the same value.
- What is an environment?
- Itās a collection of bindings and their values that exist at a given time.
- What is a function?
- A function is a piece of program wrapped in a value.
- Give an example of a function.
- Example in the JS console: prompt(āEnter passcodeā);
- What is a side effect?
- Changes in a prorgram affecting the world. Also, showing a dialogue box or writing text to the screen is known as a side effect.
- Give an example of a function that produces a side effect and another function that produces a value.
- Ex. of function that produces a side effect: prompt(āEnter you name hereā);
- Ex. of function that produces a value: console.log(Math.min(250, 700) + 200);
- What is control flow?
- A program containing more than one statement and being executed from Top to Bottom.
- What is conditional execution?
- Itās a program taking the proper branch based on the situation at hand. Itās NOT a straight road like the Control Flow is.
- What kind of keyword do you need to use to invoke conditional execution?
- You need to use the āifā keyword.
- What is an expression?
A object or variable that is representing a value by a defined name.
I.e.:int result = 0;
result = 5 +5;āresultā is an expression.
- What is a binding?
A variable, a len-type or a constant.
- What is an environment?
The current code-space with itās variables, configuration and behaviour where the programmer is working.
- What is a function?
A pre-defined set of actions that can easily executed as standalone or on a object.
-
Give an example of a function.
printBig(String inputString) {
___String upperCaseString = String.upperCase(inputString);
___print(upperCaseString );
} -
What is a side effect?
Lol, what is this question? The line where it is described in the Eloquent makes no sense to me. Side effect is side effect. Beside the main effect - rofl.
- Give an example of a function that produces a side effect and another function that produces a value.
// side effect
print(āHelloā);// value
int myResult = Math.calculate(5 + 6);
- What is control flow?
It is a synonym for the flow of the program. The flow can be regulated with, i.e. the If-else-construct, whilst running a application.
- What is conditional execution?
Itās only takes action when a certain type of criteria is succeeded. I.e. a While-loop that is executed until specific counter hits a certain value.
// Example
int counter = 0;While(counter < 10) {
___printf(āHelloā);
___counter++;
}
- What kind of keyword do you need to use to invoke conditional execution?
āIfā,
āElse-ifā,
āelseā,
āWhileā and
āForā
1- A fragment of code which produces a value.
2- Allows you to catch and hold values. For example, name of the binding and creating a value by an operator and expression.
3- The collection of bindings, their values that exist at a given time.
4- A piece of program wrapped in a value
5- prompt(āEnter passcodeā)
6- A dialog box or writing text to the screen is known as a side effect when writing a function - Functions also produce values thus, a side effect is not unnecessary to be useful.
7- a) function producing side effect: alert(āblockchain!ā)
b) function producing value: console.log ()
8- How the program code follows each other and executed from top to bottom
9- The branch path a program takes when a certain condition is executed.
10- if, else, else/if
- is a part of code which give some value
- is string conected to some variable that can be used again
- is all expresions and bindings written in paticular program
- A function is a piece of program wrapped in a value
- prompt(āEnter passcodeā);
- side effect opens a window asking for passcode.
- prompt(āEnter passcodeā);
console.log(Math.min(2, 4) + 100);
8.when your program contains more than one statement, the statements are
executed as if they are a story, from top to bottom:)
9.conditional execution is when a code is executed only if a condition fulfilled
10.if, else
1-What is an expression?
Expression is everything a programmer types in javascript.
2-What is a binding?
Binding is a holder definition that we create for a value. This can be changed anytime later on the program.
3-What is an environment?
Environment is a structural set of programs we are inside at a moment. Like we are in linux or windows or mac, are predefined program structures, which are environments. Javascript is an environment itself also. We can create or change the environment by adding more programs in the calculation.
4-What is a function?
A function is like binding but its not for a value but might be any kind of program piece. A function is a holder definition of a program (might be small or big) we create.
5-Give an example of a function.
function sum2 (a,b) {
return a + b;
};
6-What is a side effect?
Side effect is something that effects and changes the future computations in the program.
7-Give an example of a function that produces a side effect and another function that produces a value.
Console.log (a*b);
True;
8-What is control flow?
Control flow is the order of the statements.
9-What is conditional execution?
It is a control flow with braching roads. The result is variable depending on the input. Can be created with if keyword.
10-What kind of keyword do you need to use to invoke conditional execution?
Can be created with if keyword.
- Fragment of code that produces a value is called an expression. Expressions with operators ending with semicolon= statement.
- Catch and hold values JavaScript provides a thing called a binding or variable. Value for binding can be changed anytime. Generally bindings donāt contain values, they grasp them. Two bindings can refer to the same value.
- The collection of bindings and their values, that exist at a given time is called the environment. eg: browser environment.
4.Function is a piece of program wrapped in a value. In browser environment, binding prompt holds a function that shows a little dialog box asking for user input. - prompt (āEnter your nameā);
alert (āTime is arrivedā);
var name=āKiniā;
const greeting= āHelloā;
console.log ( greeting + name);
// --> Hello Kini
6.Showing a dialog box or writing text to the screen is a side effect. - side effect:
show (" Hello Kini");
prompt (āChoose between the optionsā);
value:
console.log (2+5);
// --> 7
console.log (Math.max(1,5)+6);
// --> 11 - When your program contains more than one statement, the statements are executed as if they are a story and this is control flow. straight-line control flow.
- Conditional execution is based on specifying a block of code to be executed if a condition is true or false.
if: is specifying a block of code to be executed if a condition is true.
else: is specifying a block of code to be executed if a condition is false.
else if: lots of information put together to specify a new condition if the first condition is false.
Backend V/S Frontend
-
Which type of developer programs the code that users interact with directly?
FrontEnd Program are the program with which Users Interact Directly. -
In web-development, what languages does a frontend developer typically use?
HTML
CSS
Javascript -
Which type of developer is responsible for making sure the logic of the application runs smoothly?
-
Which type of developer is responsible for handling databases?
Backend Developer -
Which languages can you use in order to communicate with a database (give 2 examples)?
MySQL, SQL Server, PostgresSQL, and Oracle
Which type of developer programs the code that users interact with directly?
Frontend
In web-development, what languages does a frontend developer typically use?
HTML, CSS & JS
Which type of developer is responsible for making sure the logic of the application runs smoothly?
Server logic -> Backenddevs.
UI/UX logic -> Frontenddevs.
Which type of developer is responsible for handling databases?
Backend
Which languages can you use in order to communicate with a database (give 2 examples)?
Node, SQL
-
Which type of developer programs the code that users interact with directly?
Frontend developers -
In web-development, what languages does a frontend developer typically use?
HTML, CSS, JavaScript -
Which type of developer is responsible for making sure the logic of the application runs smoothly?
Backend developer (for server-related)
Frontend developer (for user experience) -
Which type of developer is responsible for handling databases?
Backend developer -
Which languages can you use in order to communicate with a database (give 2 examples)?
Ruby, PHP (and bonus 3: Java, .NET, Python)
I got linked here from the blockchain for business course. Broken link.
1- front developer
2- html css java script
3- backed developer
4- backed developer
5- ySQL, SQL, PostgresSQL
The link to toshitimes for the first reading assignment is incorrect. It should have a unique link. It comes to Binding, Functions and Control Flow instead of the specific topic of Backend and Frontend.
Which type of developer programs the code that users interact with directly?
A front-end developer
In web-development, what languages does a frontend developer typically use?
HTML, Java script, CSS
Which type of developer is responsible for making sure the logic of the application runs smoothly?
Back-end developer
Which type of developer is responsible for handling databases?
Back-end developer
Which languages can you use in order to communicate with a database (give 2 examples)?
Python and Java
- An expression is a statement or fragment of code that produces a value.
- A binding or variable is an object defined to hold value.
- An environment is a collection of bindings and their values that exist at a given time.
- A function is a piece of program wrapped in a value.
- An example of a function is JavaScriptās internal Math.max, that returns the maximum number out of a given set.
- A side effect is a change that affects the outside world, like displaying a result on screen, or an internal change of state of the machine in a way that will affect the statements that come after it.
- The function Number, that converts an input value after a prompt to a number, is an example of a side effect. The same example I gave in no. 5, Math.max, is a function that produces or returns a value.
- Control flow is basically the path in which a program is executed.
- Conditional execution is choosing to execute a code if certain condition/s are met.
- if, else, else if
- Which type of developer programs the code that users interact with directly? Frontend Developer
- In web-development, what languages does a frontend developer typically use? HTML, CSS, and JavaScript
- Which type of developer is responsible for making sure the logic of the application runs smoothly? Backend Developer
- Which type of developer is responsible for handling databases? Backend Developer
- Which languages can you use in order to communicate with a database (give 2 examples)? Ruby, Python
- code that evaluates to a value.
3)Collection of given variables and their values that exist at a given time.
4)named piece of program with a specific task.
5)console.log
6)code that changes something in the program
7)alert and Math.max
8)top down control flow
9) flow can take two different routes based on a Boolean value
10) if, else
- Front-end developer
- HTML, CSS & JavaScript
- Back-end developer
- Back-end developer
- Ruby, Python