fix(challenges): V problems
This commit is contained in:
@ -6,20 +6,12 @@ challengeType: 5
|
|||||||
|
|
||||||
## Description
|
## Description
|
||||||
<section id='description'>
|
<section id='description'>
|
||||||
A vector is defined as having three dimensions as being represented by an ordered collection of three numbers: (X, Y, Z).
|
A vector is defined as having three dimensions as being represented by an ordered collection of three numbers: (X, Y, Z).
|
||||||
<p>
|
|
||||||
Task:
|
|
||||||
|
|
||||||
Write a function that takes two vectors (arrays) as input and computes their cross product.
|
|
||||||
|
|
||||||
Your function should return <code>null</code> on
|
|
||||||
invalid inputs (ie vectors of different lengths).
|
|
||||||
</p>
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
## Instructions
|
## Instructions
|
||||||
<section id='instructions'>
|
<section id='instructions'>
|
||||||
|
Write a function that takes two vectors (arrays) as input and computes their cross product. Your function should return <code>null</code> on invalid inputs such as vectors of different lengths.
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
## Tests
|
## Tests
|
||||||
@ -44,7 +36,7 @@ tests:
|
|||||||
<div id='js-seed'>
|
<div id='js-seed'>
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function crossProduct() {
|
function crossProduct(a, b) {
|
||||||
// Good luck!
|
// Good luck!
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -6,22 +6,12 @@ challengeType: 5
|
|||||||
|
|
||||||
## Description
|
## Description
|
||||||
<section id='description'>
|
<section id='description'>
|
||||||
<p>
|
A vector is defined as having three dimensions as being represented by an ordered collection of three numbers: (X, Y, Z).
|
||||||
A vector is defined as having three dimensions as being represented by an ordered collection of three numbers: (X, Y, Z).
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Task:
|
|
||||||
|
|
||||||
Write a function that takes any numbers of vectors (arrays) as input and computes their dot product.
|
|
||||||
|
|
||||||
Your function should return <code>null</code> on
|
|
||||||
invalid inputs (ie vectors of different lengths).
|
|
||||||
</p>
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
## Instructions
|
## Instructions
|
||||||
<section id='instructions'>
|
<section id='instructions'>
|
||||||
|
Write a function that takes any numbers of vectors (arrays) as input and computes their dot product. Your function should return <code>null</code> on invalid inputs such as vectors of different lengths.
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
## Tests
|
## Tests
|
||||||
@ -52,7 +42,7 @@ tests:
|
|||||||
<div id='js-seed'>
|
<div id='js-seed'>
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function dotProduct() {
|
function dotProduct(...vectors) {
|
||||||
// Good luck!
|
// Good luck!
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
Reference in New Issue
Block a user