Boolean &&

on this webpage && - Arduino Reference it says that
&& (logical and)

True only if both operands are true, e.g.
if (digitalRead(2) == HIGH && digitalRead(3) == HIGH) { // read two switches
// ...
}
is true only if both inputs are high.

I was wondering whether it woks with outputs like this

if(ledpin == HIGH && ledpin2 == HIGH) {
digitalWrite(ledpin3, HIGH);
}
else {
digitalWrite(ledpin3, LOW);

Thanks in advance and any help is appreciated.

Yes, "Input" here refers to the inputs to the && operator, not the inputs to the Arduino. In addition, && short circuits. If the first input is false, rest of the expression is not evaluated since it has to be false.

Thanks Keith!!
Know i can finnaly finish my code.

Know i can finnaly finish my code.

Be careful, though.It is unlikely that two pin numbers will both be HIGH. Pin states, maybe.

sst00:
I was wondering whether it woks with outputs like this

if(ledpin == HIGH && ledpin2 == HIGH) {
digitalWrite(ledpin3, HIGH);
}
else {
digitalWrite(ledpin3, LOW);

You're missing some digitalRead()s in there I think.

"ledpin" and "ledpin2" appear to be variable names. So you are comparing the contents of the variable "ledpin" to the macro "HIGH". Not the state of the pin referred to by "ledpin".

So in other words, your if statement could read like:

int ledpin = 2;  // example of bad variable name
int ledpin2 = 3; // example of a REALLY bad variable name

if ((ledpin == HIGH) && (ledp2in == HIGH))

// becomes
if ((2 == HIGH) && (3 == HIGH))  // this will never evaluate true, because

// actually evaluates as
if ((2 == 1) && (3 == 1)) // clearly, can't be true.