Logo Passei Direto
Buscar
Material
páginas com resultados encontrados.
páginas com resultados encontrados.

Prévia do material em texto

Respostas testes técnicos pra gringa
1 - What’s the difference between block, inline, and inline-block?
Block elements start on a new line, take the full available width by default, and allow setting width, height, margin, and padding.
Inline elements don’t break the line, only take the space of their content, and don’t allow width or height. Vertical margins don’t affect layout.
Inline-block elements stay inline but allow setting width, height, margin, and padding.
2 – What is the difference between == and === in JavaScript?
== compares values after performing type coercion, meaning JavaScript converts the operands to the same type before comparing.
=== is the strict equality operator. It compares both value and type, without type coercion.
3 – What’s the difference between a JavaScript variable that is: null, undefined or undeclared?
Undefined means a variable has been declared, but no value has been assigned to it yet.
Null is na explicit assignment that represents the intentional absence of a value.
Na undeclared variable is a variable that has not been declared at all, and accessing it results in a ReferenceError.
4 – What’s the difference between .call and .apply in JavaScript
Both .call() and .apply() are used to invoke a function with a specific this context.
The difference is how arguments are passed:
.call() accepts arguments individually, while .apply() accepts arguments as na array (or array-like object).
5 – Explain your understanding of the box model and how you would tell the browser in CSS to render your layout in different box models.
The CSS box model describes how the size of na element is calculated. It consists of content, padding, border, and margin.
By default, browsers use the content-box model, where width and height apply only to the content. Padding and border are added on top of that.
Using box-sizing: border-box, the declared width and height include content, padding, and border, which makes layout calculations more predictable.
6 – What is CSS selector specificity and how does it work?
CSS selector specificity is the mechanism used by the browser to determine which CSS rule is applied when multiple rules target the same element.
Specificity is calculated based on the types of selectors used — such as Ids, classes, attributes, and element selectors. The rule with the higher specificity wins.
7 – What is the CSS `display` property and can you give a few examples of its use?
The CSS display property defines how an element is rendered in the document flow — in other words, how it behaves in terms of layout and interaction with other elements.
It controls whether an element is block-level, inline-level, or participates in more complex layout systems like Flexbox or Grid.
8 – What’s the difference between a relative, fixed, absolute, sticky and static-ally positioned element?
The position property defines how na element is positioned in the document.
Static is the default value and follows the normal document flow.
Relative positions the element relative to its original position.
Absolute removes the element from the normal flow and positions it relative to the nearest positioned ancestor.
Fixed positions the element relative to the viewport and stays in the same place during scrolling.
Sticky behaves like relative until a scroll threshold is reached, then behaves like fixed.
9 – What are the differences between JavaScript variables created using `let`, `var` or `const`?
Var is function-scoped, while let and const are block-scoped; let allows reassignment and const does not.

Mais conteúdos dessa disciplina