Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Ebazhanov committed Dec 18, 2021
1 parent 823922d commit 98e7985
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 38 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
[![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2FEbazhanov%2Flinkedin-skill-assessments-quizzes&count_bg=%2379C83D&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=hits&edge_flat=false)](https://hits.seeyoufarm.com)

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->

[![All Contributors](https://img.shields.io/badge/all_contributors-674-orange.svg?style=flat-square)](#contributors-)

<!-- ALL-CONTRIBUTORS-BADGE:END -->

> This repository is for those looking for answers to the LinkedIn assessment quiz questions or willing to help others by contributing to the tests. Or possibly you would like to create your first pull request and be added as a contributor. Whatever is your goal - you are always welcome here! Feel free to use [online grammar checker](https://www.grammarly.com/) when you contribute!
Expand Down
54 changes: 27 additions & 27 deletions php/php-quiz.md
Original file line number Diff line number Diff line change
Expand Up @@ -844,16 +844,16 @@ Dog

[reference](http://www-db.deis.unibo.it/courses/TW/DOCS/w3schools/php/php_superglobals.asp.html)

#### Q67. Describe what happens if you run this code in a testing environment:

#### Q67. Describe what happens if you run this code in a testing environment:

`1 $capitals = ['UK' => 'London', 'France' => 'Paris'];`
`2 echo "$capitals['france'] is the capital of France.";`
`1 $capitals = ['UK' => 'London', 'France' => 'Paris'];`
`2 echo "$capitals['france'] is the capital of France.";`

- [ ] It displays: "Paris is the capital of France."
- [ ] It displays: " is the capital of France."
- [ ] It triggers a syntax error because the array keys on line 1 are in quotes.
- [ ] It triggers a syntax error because the array key on line 2 is in quotes.

#### Q68. DRY (Don't Repeat Yourself) is a principle of software development aimed at reducing repetition of software patterns. Which choice is not a way to write DRYer code with PHP?

- [ ] inheritance
Expand All @@ -868,7 +868,6 @@ Dog
- [ ] `$_SERVER["HTTP_X_FORWARDED_FOR"]`
- [ ] `getenv("REMOTE_ADDR")`


#### Q70. Your site must allow uploading of large files. What might you need to do?

- [ ] Make sure the user has the proper permissions.
Expand All @@ -878,9 +877,9 @@ Dog

#### Q71. What is the output of this script?

`1 $my_text = 'The quick grey [squirrel].';`
`2 preg_match('#\[(.*?)\]#', $my_text, $match);`
`3 print $match[1]."\n";`
`1 $my_text = 'The quick grey [squirrel].';`
`2 preg_match('#\[(.*?)\]#', $my_text, $match);`
`3 print $match[1]."\n";`

- [x] squirrel
- [ ] The quick grey [squirrel].
Expand All @@ -895,7 +894,7 @@ Dog

- [x] mango
- [ ] apple
- [ ] a parse error
- [ ] a parse error
- [ ] pear

#### Q73. What are some of the main types of errors in PHP?
Expand Down Expand Up @@ -932,7 +931,8 @@ Dog
- [ ] `$statement->bindParam(':name', '%' . $_GET['name'] . '%');`
- [ ] `$statement->bindParam('%' . $_GET['name'] . '%', ':name');`

#### Q78. Create an associative array using `$array1` as the keys and `$array2` as the values:
#### Q78. Create an associative array using `$array1` as the keys and `$array2` as the values:

`$array1 = ['country', 'capital', 'language'];`
`$array2 = ['France', 'Paris', 'French'];`

Expand All @@ -950,36 +950,36 @@ Dog

#### Q80. You want to find out what day Twelfth Night falls on after Christmas 2018. Which code should you use?

- [ ] `$xmas = new DateTime('Dec 25, 2018');`
- [ ] `$xmas = new DateTime('Dec 25, 2018');`
`$twelfth_night = $xmas-&gt;add(new DateInterval('P12D'));`
`echo $twelfth_night-&gt;format('l');`
- [ ] `$twelfth_night = strtotime('December 25, 2018 + 12 days');`
- [ ] `$twelfth_night = strtotime('December 25, 2018 + 12 days');`
`echo date('d', $twelfth_night);`

- [ ] `$twelfth_night = strtotime('December 25, 2018 + 12 days');`
- [ ] `$twelfth_night = strtotime('December 25, 2018 + 12 days');`
`echo strftime('%d', $twelfth_night);`

- [ ] `$xmas = new DateTime('Dec 25, 2018');`
- [ ] `$xmas = new DateTime('Dec 25, 2018');`
`$twelfth_night = $xmas->add(strtotime('12 days'));`
`echo $twelfth_night->format('D');`

#### Q81. Which loop displays all numbers from 1 to 10 inclusive?

- [ ] `$i = 1;`
`while ($i < 10) {`
`echo $i++ . '<br>';`
`}`

`while ($i < 10) {`
`echo $i++ . '<br>';`
`}`

- [ ] ` $i = 0;`
` while ($i <= 10) {`
` echo $i++ . '<br>';`
` }`
- [ ] ` $i = 0;`
` while ($i <= 10) {`
` echo $i++ . '<br>';`
` }`

- [ ] `while ($i &lt;= 10) {`
` echo ++$i . '&lt;br&gt;';`
`}`
` echo ++$i . '&lt;br&gt;';`
`}`

- [x] `$i = 0;`
`while ($i < 10) {`
` echo ++$i . '<br>';`
`}`
`while ($i < 10) {`
` echo ++$i . '<br>';`
`}`
23 changes: 12 additions & 11 deletions react/reactjs-quiz.md
Original file line number Diff line number Diff line change
Expand Up @@ -937,9 +937,9 @@ const [count, setCount] = useState(0);
- [x] array destructuring
- [ ] spread operating
- [ ] code pushing

#### Q81. What is the first file loaded by the browser in a basic React project?

- [ ] src/App.js
- [ ] src/index.js
- [ ] public/manifest.json
Expand All @@ -948,21 +948,21 @@ const [count, setCount] = useState(0);
#### Q82. The code below is rendering nothing, and there is an error that says "ReactDOM is not defined." How do you fix this issue?

```javascript
import React from "react";
import { render } from "react-dom";
import React from 'react';
import { render } from 'react-dom';

const element = <h1>Hi</h1>;
ReactDOM.render(element, document.getElementById("root"));

ReactDOM.render(element, document.getElementById('root'));
```

- [x] `render(element, document.getElementById("root"));`
- [ ] `ReactDOM(element, document.getElementById("root"));`
- [ ] `renderDOM(element, document.getElementById("root"));`
- [ ] `DOM(element, document.getElementById("root"));`

#### Q83. In this component, how do you display whether the user was logged in or not?

```javascript
render() {
const isLoggedIn = this.state.isLoggedIn;
Expand All @@ -973,13 +973,14 @@ render() {
);
}
```

- [ ] `The user is loggedIn ? logged in : not logged in.`
- [ ] Write a function to check the login status.
- [ ] `The user is {isLoggedIn = "no"}.`
- [x] `The user is {isLoggedIn ? "logged in." : "not logged in"}.`

#### Q84. You are rendering a list with React when this warning appears in the console: "Warning: Each child in a list should have a unique 'key' prop." How do you fix this issue?

- [ ] Pass the name of each item as its key.
- [ ] Add a key prop with the same value to each item the list.
- [ ] Clear the console warnings.
Expand Down

0 comments on commit 98e7985

Please sign in to comment.