Functios Flashcards

set of instructions and are reusable, perform one action as a best practice.They form the building blocks of a program.

1
Q

what is a function

A

set of instructions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

variables

A

hold number, strings and data types at given time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

why the variables are undefined?

A

if we didn’t put a value on it

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

difference between var and let

A

when you use let, a variable with the same name can only be declared once.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

difference between let and const

A

Change the code so that all variables are declared using let or const. Use let when you want the variable to change, and const when you want the variable to remain constant.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

++; h –;

A

+1 h -1;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

a= a+=6 ; h shortcut a+=6;

A

otan prostheteis to proigoumeno
px a einai 5

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

string

A

a string can be surrounded by single or double quotes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

+=

A

otan prostheteis kati me to proigoumeno

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

.length

A

epistrefei to mikos

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

javascript counting

A

begins from 0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

In JavaScript, String values are immutable, which means that they cannot be altered once created.

A

you can always reassign a String

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

remove an item with pop function

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

.shift() removes the first item

A

.pop() removes the last element of an array

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

unshift()adds the elements of the begining of an array

A

shift() reads the first item

17
Q

What are parameters

A

variables that act as placeholders kai einai mesa stin parenthesi

18
Q

se kathe array vazo ena subarray kai meta vazo komma

A
19
Q

what are arguments

A

values that are passed to an argument

20
Q

local scope

A

sth inside a context and sth that contains let, const and myVar

21
Q

.push()

A

adds an item to the end of array

22
Q

.shift()

A

removes the first element of an array

23
Q

Strict equality (===) is the counterpart to the equality operator (==). However, unlike the equality operator, which attempts to convert both values being compared to a common type, the strict equality operator does not perform a type conversion.

A

If the values being compared have different types, they are considered unequal, and the strict equality operator will return false.
3 === 3 // true
3 === ‘3’ // false
In the second example, 3 is a Number type and ‘3’ is a String type.

24
Q

alt attribute

A

is used for screen readers to improve accessibility and is displayed if the image fails to load.

25
Q

<a></a> would link to freecodecamp.org.

A
26
Q

what is inline elements

A

both input and button elements are inline elements, which don’t appear on new lines.

27
Q

The id attribute is used to identify specific HTML elements. Each id attribute’s value must be unique from all other id values for the entire page.

A
28
Q
A