From f7218dca1a85b753c29f75de433a06841512d9df Mon Sep 17 00:00:00 2001 From: freeCodeCamp's Camper Bot Date: Wed, 16 Oct 2024 15:13:01 +0530 Subject: [PATCH] chore(i18n,learn): processed translations (#81) --- .../build-a-personal-portfolio-webpage.md | 5 +- .../66edc3ab8c6413c344f401bf.md | 236 ++++++++++-------- .../build-a-personal-portfolio-webpage.md | 5 +- .../66edc3ab8c6413c344f401bf.md | 236 ++++++++++-------- .../build-a-personal-portfolio-webpage.md | 5 +- .../66edc3ab8c6413c344f401bf.md | 236 ++++++++++-------- .../build-a-personal-portfolio-webpage.md | 5 +- .../66edc3ab8c6413c344f401bf.md | 236 ++++++++++-------- .../build-a-personal-portfolio-webpage.md | 5 +- .../66edc3ab8c6413c344f401bf.md | 236 ++++++++++-------- .../build-a-personal-portfolio-webpage.md | 5 +- .../66edc3ab8c6413c344f401bf.md | 236 ++++++++++-------- .../build-a-personal-portfolio-webpage.md | 5 +- .../66edc3ab8c6413c344f401bf.md | 236 ++++++++++-------- .../build-a-personal-portfolio-webpage.md | 5 +- .../66edc3ab8c6413c344f401bf.md | 236 ++++++++++-------- .../build-a-personal-portfolio-webpage.md | 5 +- .../66edc3ab8c6413c344f401bf.md | 236 ++++++++++-------- .../build-a-personal-portfolio-webpage.md | 5 +- .../66edc3ab8c6413c344f401bf.md | 236 ++++++++++-------- .../build-a-personal-portfolio-webpage.md | 5 +- .../66edc3ab8c6413c344f401bf.md | 236 ++++++++++-------- 22 files changed, 1540 insertions(+), 1111 deletions(-) diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md b/curriculum/challenges/arabic/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md index c2fe8347f6..7d8b6a86ad 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md @@ -286,4 +286,7 @@ p{ ```html

text


Projects

text


``` -`css` + +```css + +``` diff --git a/curriculum/challenges/arabic/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md b/curriculum/challenges/arabic/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md index a8b6821d41..8867ec39b4 100644 --- a/curriculum/challenges/arabic/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md +++ b/curriculum/challenges/arabic/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md @@ -17,439 +17,475 @@ Answer all of the questions below correctly to pass the quiz. #### --text-- -Placeholder question +What is the result of this code? + +``` js +const num1 = Number('888'); +const num2 = new Number('777'); + +console.log(num1 === 888); +console.log(num2 === 777); +``` #### --distractors-- -Placeholder distractor 1 +```js +true +true +``` --- -Placeholder distractor 2 +```js +false +false +``` --- -Placeholder distractor 3 +```js +false +true +``` #### --answer-- -Placeholder answer +```js +true +false +``` ### --question-- #### --text-- -Placeholder question +Which of the following is not an arithmetic operator in JavaScript? #### --distractors-- -Placeholder distractor 1 +`%` --- -Placeholder distractor 2 +`+` --- -Placeholder distractor 3 +`--` #### --answer-- -Placeholder answer +`==` ### --question-- #### --text-- -Placeholder question +Which of the following will log the correct gross profit? #### --distractors-- -Placeholder distractor 1 +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + store1_sales + store2_sales); +``` --- -Placeholder distractor 2 +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + store1_sales - store2_sales); +``` --- -Placeholder distractor 3 +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + (store1_sales - store2_sales)); +``` #### --answer-- -Placeholder answer +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + (store1_sales + store2_sales)); +``` ### --question-- #### --text-- -Placeholder question +What is the result of the statement `25 * 4 - 16 / (2 * 4) + 8`? #### --distractors-- -Placeholder distractor 1 +`18.5` --- -Placeholder distractor 2 +`107.5` --- -Placeholder distractor 3 +`17` #### --answer-- -Placeholder answer +`106` ### --question-- #### --text-- -Placeholder question +Which operator should you use when decrementing a variable in JavaScript? #### --distractors-- -Placeholder distractor 1 +`++` --- -Placeholder distractor 2 +`//` --- -Placeholder distractor 3 +`**` #### --answer-- -Placeholder answer +`--` ### --question-- #### --text-- -Placeholder question +Which of the following is not a bitwise operator? #### --distractors-- -Placeholder distractor 1 +`&` --- -Placeholder distractor 2 +`|` --- -Placeholder distractor 3 +`^` #### --answer-- -Placeholder answer +`>` ### --question-- #### --text-- -Placeholder question +Which of the following is the correct compound operator for getting the remainder? #### --distractors-- -Placeholder distractor 1 +`//=` --- -Placeholder distractor 2 +`\=` --- -Placeholder distractor 3 +`%%=` #### --answer-- -Placeholder answer +`%=` ### --question-- #### --text-- -Placeholder question +What is the difference between the `==` and `===` operators? #### --distractors-- -Placeholder distractor 1 +There is no difference. The comparison result will always have the same result. --- -Placeholder distractor 2 +The `==` operator is used to check if the data type is the same while the `===` is used to check if the value is equal. --- -Placeholder distractor 3 +The `==` operator can only be used with primitive types while the `===` operator is only used for objects. #### --answer-- -Placeholder answer +The `==` operator only compares values whereas the `===` operator compares values and types. ### --question-- #### --text-- -Placeholder question +Which of the following statements are false about unary plus (`+`) operators? #### --distractors-- -Placeholder distractor 1 +It tries to convert the operand into a number. --- -Placeholder distractor 2 +It is the fastest way to convert an operand to a number. --- -Placeholder distractor 3 +It can convert operands with negative numbers except for hexadecimals. #### --answer-- -Placeholder answer +It can't convert `true`, `false`, or `null` into a number. ### --question-- #### --text-- -Placeholder question +Which method in the built-in Math object is used to round up a number? #### --distractors-- -Placeholder distractor 1 +`Math.round(num)` --- -Placeholder distractor 2 +`Math.floor(num)` --- -Placeholder distractor 3 +`Math.fround(num)` #### --answer-- -Placeholder answer +`Math.ceil(num)` ### --question-- #### --text-- -Placeholder question +Which of the following Math object methods are used to raise a base to a power? #### --distractors-- -Placeholder distractor 1 +`Math.exp(base, power)` --- -Placeholder distractor 2 +`Math.raise(base, power)` --- -Placeholder distractor 3 +`Math.e(base, power)` #### --answer-- -Placeholder answer +`Math.pow(base, power)` ### --question-- #### --text-- -Placeholder question +Which of the following is the correct method for generating a random number in JavaScript? #### --distractors-- -Placeholder distractor 1 +`Math.rand(1,10)` --- -Placeholder distractor 2 +`Math.rand()` --- -Placeholder distractor 3 +`Math.random(1,10)` #### --answer-- -Placeholder answer +`Math.random()` ### --question-- #### --text-- -Placeholder question +Which of the following will return `false`? #### --distractors-- -Placeholder distractor 1 +`isNaN("1998", "1999")` --- -Placeholder distractor 2 +`isNaN({})` --- -Placeholder distractor 3 +`isNaN(undefined)` #### --answer-- -Placeholder answer +`isNaN(null)` ### --question-- #### --text-- -Placeholder question +Which of the following will convert `172` to its hexadecimal equivalent? #### --distractors-- -Placeholder distractor 1 +`(-0xa5).toString(2);` --- -Placeholder distractor 2 +`(172).string(0x);` --- -Placeholder distractor 3 +`(172).parseString(0x);` #### --answer-- -Placeholder answer +`(172).toString(16);` ### --question-- #### --text-- -Placeholder question +Which of the following is the right way to convert a string to an integer? #### --distractors-- -Placeholder distractor 1 +`parseINT("300")` --- -Placeholder distractor 2 +`int("300")` --- -Placeholder distractor 3 +`integer("300")` #### --answer-- -Placeholder answer +`parseInt("300")` ### --question-- #### --text-- -Placeholder question +Which of the following statements is false? #### --distractors-- -Placeholder distractor 1 +`parseFloat()` ignores trailing invalid characters --- -Placeholder distractor 2 +`parseFloat()` can parse a string that begins with `Infinity` or `-Infinity` --- -Placeholder distractor 3 +`parseFloat("0x1f")` will return `0` #### --answer-- -Placeholder answer +`parseFloat()` requires two parameters ### --question-- #### --text-- -Placeholder question +Which of the following is false? #### --distractors-- -Placeholder distractor 1 +A number greater than 100 as an argument to the `Number.prototype.toFixed()` method will result to a range error --- -Placeholder distractor 2 +`Number.prototype.toFixed(numDecimalPlaces)` is used to return a number converted to a string with decimals places depending on the argument --- -Placeholder distractor 3 +Calling the `Number.prototype.toFixed()` method on a number object with decimal points and no argument will round the number to the nearest ones #### --answer-- -Placeholder answer +Using `Number.prototype.toFixed()` without an argument will by default add a decimal point followed by a zero ### --question-- #### --text-- -Placeholder question +Which of the following is not a comparison operator? #### --distractors-- -Placeholder distractor 1 +`!=` --- -Placeholder distractor 2 +`>=` --- -Placeholder distractor 3 +`===` #### --answer-- -Placeholder answer +`!>` ### --question-- #### --text-- -Placeholder question +Which of the following is false? #### --distractors-- -Placeholder distractor 1 +Exponentiation has a lower operator precedence than the grouping operator `()`. --- -Placeholder distractor 2 +Postfix operators like `x++` or `x--` has higher precedence than prefix operators. --- -Placeholder distractor 3 +Relational operators like `>` or `<` has higher precedence than equality operators. #### --answer-- -Placeholder answer +Logical operator like `AND` and `OR` have higher precedence than bitwise operators. ### --question-- #### --text-- -Placeholder question +`Math.random()` returns a number in what range? #### --distractors-- -Placeholder distractor 1 +`Math.random()` returns a number between 0 (inclusive) and 1 (inclusive) --- -Placeholder distractor 2 +`Math.random()` returns a number between 0 (exclusive) and 1 (inclusive) --- -Placeholder distractor 3 +`Math.random()` returns a number between 0 (exclusive) and 1 (exclusive) #### --answer-- -Placeholder answer +`Math.random()`returns a number between 0 (inclusive) and 1 (exclusive) diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md index fcae197c19..278f93b305 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md @@ -286,4 +286,7 @@ p{ ```html

text


Projects

text


``` -`css` + +```css + +``` diff --git a/curriculum/challenges/chinese-traditional/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md b/curriculum/challenges/chinese-traditional/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md index a8b6821d41..8867ec39b4 100644 --- a/curriculum/challenges/chinese-traditional/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md +++ b/curriculum/challenges/chinese-traditional/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md @@ -17,439 +17,475 @@ Answer all of the questions below correctly to pass the quiz. #### --text-- -Placeholder question +What is the result of this code? + +``` js +const num1 = Number('888'); +const num2 = new Number('777'); + +console.log(num1 === 888); +console.log(num2 === 777); +``` #### --distractors-- -Placeholder distractor 1 +```js +true +true +``` --- -Placeholder distractor 2 +```js +false +false +``` --- -Placeholder distractor 3 +```js +false +true +``` #### --answer-- -Placeholder answer +```js +true +false +``` ### --question-- #### --text-- -Placeholder question +Which of the following is not an arithmetic operator in JavaScript? #### --distractors-- -Placeholder distractor 1 +`%` --- -Placeholder distractor 2 +`+` --- -Placeholder distractor 3 +`--` #### --answer-- -Placeholder answer +`==` ### --question-- #### --text-- -Placeholder question +Which of the following will log the correct gross profit? #### --distractors-- -Placeholder distractor 1 +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + store1_sales + store2_sales); +``` --- -Placeholder distractor 2 +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + store1_sales - store2_sales); +``` --- -Placeholder distractor 3 +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + (store1_sales - store2_sales)); +``` #### --answer-- -Placeholder answer +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + (store1_sales + store2_sales)); +``` ### --question-- #### --text-- -Placeholder question +What is the result of the statement `25 * 4 - 16 / (2 * 4) + 8`? #### --distractors-- -Placeholder distractor 1 +`18.5` --- -Placeholder distractor 2 +`107.5` --- -Placeholder distractor 3 +`17` #### --answer-- -Placeholder answer +`106` ### --question-- #### --text-- -Placeholder question +Which operator should you use when decrementing a variable in JavaScript? #### --distractors-- -Placeholder distractor 1 +`++` --- -Placeholder distractor 2 +`//` --- -Placeholder distractor 3 +`**` #### --answer-- -Placeholder answer +`--` ### --question-- #### --text-- -Placeholder question +Which of the following is not a bitwise operator? #### --distractors-- -Placeholder distractor 1 +`&` --- -Placeholder distractor 2 +`|` --- -Placeholder distractor 3 +`^` #### --answer-- -Placeholder answer +`>` ### --question-- #### --text-- -Placeholder question +Which of the following is the correct compound operator for getting the remainder? #### --distractors-- -Placeholder distractor 1 +`//=` --- -Placeholder distractor 2 +`\=` --- -Placeholder distractor 3 +`%%=` #### --answer-- -Placeholder answer +`%=` ### --question-- #### --text-- -Placeholder question +What is the difference between the `==` and `===` operators? #### --distractors-- -Placeholder distractor 1 +There is no difference. The comparison result will always have the same result. --- -Placeholder distractor 2 +The `==` operator is used to check if the data type is the same while the `===` is used to check if the value is equal. --- -Placeholder distractor 3 +The `==` operator can only be used with primitive types while the `===` operator is only used for objects. #### --answer-- -Placeholder answer +The `==` operator only compares values whereas the `===` operator compares values and types. ### --question-- #### --text-- -Placeholder question +Which of the following statements are false about unary plus (`+`) operators? #### --distractors-- -Placeholder distractor 1 +It tries to convert the operand into a number. --- -Placeholder distractor 2 +It is the fastest way to convert an operand to a number. --- -Placeholder distractor 3 +It can convert operands with negative numbers except for hexadecimals. #### --answer-- -Placeholder answer +It can't convert `true`, `false`, or `null` into a number. ### --question-- #### --text-- -Placeholder question +Which method in the built-in Math object is used to round up a number? #### --distractors-- -Placeholder distractor 1 +`Math.round(num)` --- -Placeholder distractor 2 +`Math.floor(num)` --- -Placeholder distractor 3 +`Math.fround(num)` #### --answer-- -Placeholder answer +`Math.ceil(num)` ### --question-- #### --text-- -Placeholder question +Which of the following Math object methods are used to raise a base to a power? #### --distractors-- -Placeholder distractor 1 +`Math.exp(base, power)` --- -Placeholder distractor 2 +`Math.raise(base, power)` --- -Placeholder distractor 3 +`Math.e(base, power)` #### --answer-- -Placeholder answer +`Math.pow(base, power)` ### --question-- #### --text-- -Placeholder question +Which of the following is the correct method for generating a random number in JavaScript? #### --distractors-- -Placeholder distractor 1 +`Math.rand(1,10)` --- -Placeholder distractor 2 +`Math.rand()` --- -Placeholder distractor 3 +`Math.random(1,10)` #### --answer-- -Placeholder answer +`Math.random()` ### --question-- #### --text-- -Placeholder question +Which of the following will return `false`? #### --distractors-- -Placeholder distractor 1 +`isNaN("1998", "1999")` --- -Placeholder distractor 2 +`isNaN({})` --- -Placeholder distractor 3 +`isNaN(undefined)` #### --answer-- -Placeholder answer +`isNaN(null)` ### --question-- #### --text-- -Placeholder question +Which of the following will convert `172` to its hexadecimal equivalent? #### --distractors-- -Placeholder distractor 1 +`(-0xa5).toString(2);` --- -Placeholder distractor 2 +`(172).string(0x);` --- -Placeholder distractor 3 +`(172).parseString(0x);` #### --answer-- -Placeholder answer +`(172).toString(16);` ### --question-- #### --text-- -Placeholder question +Which of the following is the right way to convert a string to an integer? #### --distractors-- -Placeholder distractor 1 +`parseINT("300")` --- -Placeholder distractor 2 +`int("300")` --- -Placeholder distractor 3 +`integer("300")` #### --answer-- -Placeholder answer +`parseInt("300")` ### --question-- #### --text-- -Placeholder question +Which of the following statements is false? #### --distractors-- -Placeholder distractor 1 +`parseFloat()` ignores trailing invalid characters --- -Placeholder distractor 2 +`parseFloat()` can parse a string that begins with `Infinity` or `-Infinity` --- -Placeholder distractor 3 +`parseFloat("0x1f")` will return `0` #### --answer-- -Placeholder answer +`parseFloat()` requires two parameters ### --question-- #### --text-- -Placeholder question +Which of the following is false? #### --distractors-- -Placeholder distractor 1 +A number greater than 100 as an argument to the `Number.prototype.toFixed()` method will result to a range error --- -Placeholder distractor 2 +`Number.prototype.toFixed(numDecimalPlaces)` is used to return a number converted to a string with decimals places depending on the argument --- -Placeholder distractor 3 +Calling the `Number.prototype.toFixed()` method on a number object with decimal points and no argument will round the number to the nearest ones #### --answer-- -Placeholder answer +Using `Number.prototype.toFixed()` without an argument will by default add a decimal point followed by a zero ### --question-- #### --text-- -Placeholder question +Which of the following is not a comparison operator? #### --distractors-- -Placeholder distractor 1 +`!=` --- -Placeholder distractor 2 +`>=` --- -Placeholder distractor 3 +`===` #### --answer-- -Placeholder answer +`!>` ### --question-- #### --text-- -Placeholder question +Which of the following is false? #### --distractors-- -Placeholder distractor 1 +Exponentiation has a lower operator precedence than the grouping operator `()`. --- -Placeholder distractor 2 +Postfix operators like `x++` or `x--` has higher precedence than prefix operators. --- -Placeholder distractor 3 +Relational operators like `>` or `<` has higher precedence than equality operators. #### --answer-- -Placeholder answer +Logical operator like `AND` and `OR` have higher precedence than bitwise operators. ### --question-- #### --text-- -Placeholder question +`Math.random()` returns a number in what range? #### --distractors-- -Placeholder distractor 1 +`Math.random()` returns a number between 0 (inclusive) and 1 (inclusive) --- -Placeholder distractor 2 +`Math.random()` returns a number between 0 (exclusive) and 1 (inclusive) --- -Placeholder distractor 3 +`Math.random()` returns a number between 0 (exclusive) and 1 (exclusive) #### --answer-- -Placeholder answer +`Math.random()`returns a number between 0 (inclusive) and 1 (exclusive) diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md b/curriculum/challenges/chinese/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md index 7ff6153afb..9c555f6a26 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md @@ -286,4 +286,7 @@ p{ ```html

text


Projects

text


``` -`css` + +```css + +``` diff --git a/curriculum/challenges/chinese/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md b/curriculum/challenges/chinese/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md index a8b6821d41..8867ec39b4 100644 --- a/curriculum/challenges/chinese/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md +++ b/curriculum/challenges/chinese/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md @@ -17,439 +17,475 @@ Answer all of the questions below correctly to pass the quiz. #### --text-- -Placeholder question +What is the result of this code? + +``` js +const num1 = Number('888'); +const num2 = new Number('777'); + +console.log(num1 === 888); +console.log(num2 === 777); +``` #### --distractors-- -Placeholder distractor 1 +```js +true +true +``` --- -Placeholder distractor 2 +```js +false +false +``` --- -Placeholder distractor 3 +```js +false +true +``` #### --answer-- -Placeholder answer +```js +true +false +``` ### --question-- #### --text-- -Placeholder question +Which of the following is not an arithmetic operator in JavaScript? #### --distractors-- -Placeholder distractor 1 +`%` --- -Placeholder distractor 2 +`+` --- -Placeholder distractor 3 +`--` #### --answer-- -Placeholder answer +`==` ### --question-- #### --text-- -Placeholder question +Which of the following will log the correct gross profit? #### --distractors-- -Placeholder distractor 1 +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + store1_sales + store2_sales); +``` --- -Placeholder distractor 2 +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + store1_sales - store2_sales); +``` --- -Placeholder distractor 3 +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + (store1_sales - store2_sales)); +``` #### --answer-- -Placeholder answer +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + (store1_sales + store2_sales)); +``` ### --question-- #### --text-- -Placeholder question +What is the result of the statement `25 * 4 - 16 / (2 * 4) + 8`? #### --distractors-- -Placeholder distractor 1 +`18.5` --- -Placeholder distractor 2 +`107.5` --- -Placeholder distractor 3 +`17` #### --answer-- -Placeholder answer +`106` ### --question-- #### --text-- -Placeholder question +Which operator should you use when decrementing a variable in JavaScript? #### --distractors-- -Placeholder distractor 1 +`++` --- -Placeholder distractor 2 +`//` --- -Placeholder distractor 3 +`**` #### --answer-- -Placeholder answer +`--` ### --question-- #### --text-- -Placeholder question +Which of the following is not a bitwise operator? #### --distractors-- -Placeholder distractor 1 +`&` --- -Placeholder distractor 2 +`|` --- -Placeholder distractor 3 +`^` #### --answer-- -Placeholder answer +`>` ### --question-- #### --text-- -Placeholder question +Which of the following is the correct compound operator for getting the remainder? #### --distractors-- -Placeholder distractor 1 +`//=` --- -Placeholder distractor 2 +`\=` --- -Placeholder distractor 3 +`%%=` #### --answer-- -Placeholder answer +`%=` ### --question-- #### --text-- -Placeholder question +What is the difference between the `==` and `===` operators? #### --distractors-- -Placeholder distractor 1 +There is no difference. The comparison result will always have the same result. --- -Placeholder distractor 2 +The `==` operator is used to check if the data type is the same while the `===` is used to check if the value is equal. --- -Placeholder distractor 3 +The `==` operator can only be used with primitive types while the `===` operator is only used for objects. #### --answer-- -Placeholder answer +The `==` operator only compares values whereas the `===` operator compares values and types. ### --question-- #### --text-- -Placeholder question +Which of the following statements are false about unary plus (`+`) operators? #### --distractors-- -Placeholder distractor 1 +It tries to convert the operand into a number. --- -Placeholder distractor 2 +It is the fastest way to convert an operand to a number. --- -Placeholder distractor 3 +It can convert operands with negative numbers except for hexadecimals. #### --answer-- -Placeholder answer +It can't convert `true`, `false`, or `null` into a number. ### --question-- #### --text-- -Placeholder question +Which method in the built-in Math object is used to round up a number? #### --distractors-- -Placeholder distractor 1 +`Math.round(num)` --- -Placeholder distractor 2 +`Math.floor(num)` --- -Placeholder distractor 3 +`Math.fround(num)` #### --answer-- -Placeholder answer +`Math.ceil(num)` ### --question-- #### --text-- -Placeholder question +Which of the following Math object methods are used to raise a base to a power? #### --distractors-- -Placeholder distractor 1 +`Math.exp(base, power)` --- -Placeholder distractor 2 +`Math.raise(base, power)` --- -Placeholder distractor 3 +`Math.e(base, power)` #### --answer-- -Placeholder answer +`Math.pow(base, power)` ### --question-- #### --text-- -Placeholder question +Which of the following is the correct method for generating a random number in JavaScript? #### --distractors-- -Placeholder distractor 1 +`Math.rand(1,10)` --- -Placeholder distractor 2 +`Math.rand()` --- -Placeholder distractor 3 +`Math.random(1,10)` #### --answer-- -Placeholder answer +`Math.random()` ### --question-- #### --text-- -Placeholder question +Which of the following will return `false`? #### --distractors-- -Placeholder distractor 1 +`isNaN("1998", "1999")` --- -Placeholder distractor 2 +`isNaN({})` --- -Placeholder distractor 3 +`isNaN(undefined)` #### --answer-- -Placeholder answer +`isNaN(null)` ### --question-- #### --text-- -Placeholder question +Which of the following will convert `172` to its hexadecimal equivalent? #### --distractors-- -Placeholder distractor 1 +`(-0xa5).toString(2);` --- -Placeholder distractor 2 +`(172).string(0x);` --- -Placeholder distractor 3 +`(172).parseString(0x);` #### --answer-- -Placeholder answer +`(172).toString(16);` ### --question-- #### --text-- -Placeholder question +Which of the following is the right way to convert a string to an integer? #### --distractors-- -Placeholder distractor 1 +`parseINT("300")` --- -Placeholder distractor 2 +`int("300")` --- -Placeholder distractor 3 +`integer("300")` #### --answer-- -Placeholder answer +`parseInt("300")` ### --question-- #### --text-- -Placeholder question +Which of the following statements is false? #### --distractors-- -Placeholder distractor 1 +`parseFloat()` ignores trailing invalid characters --- -Placeholder distractor 2 +`parseFloat()` can parse a string that begins with `Infinity` or `-Infinity` --- -Placeholder distractor 3 +`parseFloat("0x1f")` will return `0` #### --answer-- -Placeholder answer +`parseFloat()` requires two parameters ### --question-- #### --text-- -Placeholder question +Which of the following is false? #### --distractors-- -Placeholder distractor 1 +A number greater than 100 as an argument to the `Number.prototype.toFixed()` method will result to a range error --- -Placeholder distractor 2 +`Number.prototype.toFixed(numDecimalPlaces)` is used to return a number converted to a string with decimals places depending on the argument --- -Placeholder distractor 3 +Calling the `Number.prototype.toFixed()` method on a number object with decimal points and no argument will round the number to the nearest ones #### --answer-- -Placeholder answer +Using `Number.prototype.toFixed()` without an argument will by default add a decimal point followed by a zero ### --question-- #### --text-- -Placeholder question +Which of the following is not a comparison operator? #### --distractors-- -Placeholder distractor 1 +`!=` --- -Placeholder distractor 2 +`>=` --- -Placeholder distractor 3 +`===` #### --answer-- -Placeholder answer +`!>` ### --question-- #### --text-- -Placeholder question +Which of the following is false? #### --distractors-- -Placeholder distractor 1 +Exponentiation has a lower operator precedence than the grouping operator `()`. --- -Placeholder distractor 2 +Postfix operators like `x++` or `x--` has higher precedence than prefix operators. --- -Placeholder distractor 3 +Relational operators like `>` or `<` has higher precedence than equality operators. #### --answer-- -Placeholder answer +Logical operator like `AND` and `OR` have higher precedence than bitwise operators. ### --question-- #### --text-- -Placeholder question +`Math.random()` returns a number in what range? #### --distractors-- -Placeholder distractor 1 +`Math.random()` returns a number between 0 (inclusive) and 1 (inclusive) --- -Placeholder distractor 2 +`Math.random()` returns a number between 0 (exclusive) and 1 (inclusive) --- -Placeholder distractor 3 +`Math.random()` returns a number between 0 (exclusive) and 1 (exclusive) #### --answer-- -Placeholder answer +`Math.random()`returns a number between 0 (inclusive) and 1 (exclusive) diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md b/curriculum/challenges/espanol/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md index 98309bcc6e..29f31c5f31 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md @@ -286,4 +286,7 @@ p{ ```html

text


Projects

text


``` -`css` + +```css + +``` diff --git a/curriculum/challenges/espanol/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md b/curriculum/challenges/espanol/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md index a8b6821d41..8867ec39b4 100644 --- a/curriculum/challenges/espanol/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md +++ b/curriculum/challenges/espanol/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md @@ -17,439 +17,475 @@ Answer all of the questions below correctly to pass the quiz. #### --text-- -Placeholder question +What is the result of this code? + +``` js +const num1 = Number('888'); +const num2 = new Number('777'); + +console.log(num1 === 888); +console.log(num2 === 777); +``` #### --distractors-- -Placeholder distractor 1 +```js +true +true +``` --- -Placeholder distractor 2 +```js +false +false +``` --- -Placeholder distractor 3 +```js +false +true +``` #### --answer-- -Placeholder answer +```js +true +false +``` ### --question-- #### --text-- -Placeholder question +Which of the following is not an arithmetic operator in JavaScript? #### --distractors-- -Placeholder distractor 1 +`%` --- -Placeholder distractor 2 +`+` --- -Placeholder distractor 3 +`--` #### --answer-- -Placeholder answer +`==` ### --question-- #### --text-- -Placeholder question +Which of the following will log the correct gross profit? #### --distractors-- -Placeholder distractor 1 +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + store1_sales + store2_sales); +``` --- -Placeholder distractor 2 +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + store1_sales - store2_sales); +``` --- -Placeholder distractor 3 +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + (store1_sales - store2_sales)); +``` #### --answer-- -Placeholder answer +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + (store1_sales + store2_sales)); +``` ### --question-- #### --text-- -Placeholder question +What is the result of the statement `25 * 4 - 16 / (2 * 4) + 8`? #### --distractors-- -Placeholder distractor 1 +`18.5` --- -Placeholder distractor 2 +`107.5` --- -Placeholder distractor 3 +`17` #### --answer-- -Placeholder answer +`106` ### --question-- #### --text-- -Placeholder question +Which operator should you use when decrementing a variable in JavaScript? #### --distractors-- -Placeholder distractor 1 +`++` --- -Placeholder distractor 2 +`//` --- -Placeholder distractor 3 +`**` #### --answer-- -Placeholder answer +`--` ### --question-- #### --text-- -Placeholder question +Which of the following is not a bitwise operator? #### --distractors-- -Placeholder distractor 1 +`&` --- -Placeholder distractor 2 +`|` --- -Placeholder distractor 3 +`^` #### --answer-- -Placeholder answer +`>` ### --question-- #### --text-- -Placeholder question +Which of the following is the correct compound operator for getting the remainder? #### --distractors-- -Placeholder distractor 1 +`//=` --- -Placeholder distractor 2 +`\=` --- -Placeholder distractor 3 +`%%=` #### --answer-- -Placeholder answer +`%=` ### --question-- #### --text-- -Placeholder question +What is the difference between the `==` and `===` operators? #### --distractors-- -Placeholder distractor 1 +There is no difference. The comparison result will always have the same result. --- -Placeholder distractor 2 +The `==` operator is used to check if the data type is the same while the `===` is used to check if the value is equal. --- -Placeholder distractor 3 +The `==` operator can only be used with primitive types while the `===` operator is only used for objects. #### --answer-- -Placeholder answer +The `==` operator only compares values whereas the `===` operator compares values and types. ### --question-- #### --text-- -Placeholder question +Which of the following statements are false about unary plus (`+`) operators? #### --distractors-- -Placeholder distractor 1 +It tries to convert the operand into a number. --- -Placeholder distractor 2 +It is the fastest way to convert an operand to a number. --- -Placeholder distractor 3 +It can convert operands with negative numbers except for hexadecimals. #### --answer-- -Placeholder answer +It can't convert `true`, `false`, or `null` into a number. ### --question-- #### --text-- -Placeholder question +Which method in the built-in Math object is used to round up a number? #### --distractors-- -Placeholder distractor 1 +`Math.round(num)` --- -Placeholder distractor 2 +`Math.floor(num)` --- -Placeholder distractor 3 +`Math.fround(num)` #### --answer-- -Placeholder answer +`Math.ceil(num)` ### --question-- #### --text-- -Placeholder question +Which of the following Math object methods are used to raise a base to a power? #### --distractors-- -Placeholder distractor 1 +`Math.exp(base, power)` --- -Placeholder distractor 2 +`Math.raise(base, power)` --- -Placeholder distractor 3 +`Math.e(base, power)` #### --answer-- -Placeholder answer +`Math.pow(base, power)` ### --question-- #### --text-- -Placeholder question +Which of the following is the correct method for generating a random number in JavaScript? #### --distractors-- -Placeholder distractor 1 +`Math.rand(1,10)` --- -Placeholder distractor 2 +`Math.rand()` --- -Placeholder distractor 3 +`Math.random(1,10)` #### --answer-- -Placeholder answer +`Math.random()` ### --question-- #### --text-- -Placeholder question +Which of the following will return `false`? #### --distractors-- -Placeholder distractor 1 +`isNaN("1998", "1999")` --- -Placeholder distractor 2 +`isNaN({})` --- -Placeholder distractor 3 +`isNaN(undefined)` #### --answer-- -Placeholder answer +`isNaN(null)` ### --question-- #### --text-- -Placeholder question +Which of the following will convert `172` to its hexadecimal equivalent? #### --distractors-- -Placeholder distractor 1 +`(-0xa5).toString(2);` --- -Placeholder distractor 2 +`(172).string(0x);` --- -Placeholder distractor 3 +`(172).parseString(0x);` #### --answer-- -Placeholder answer +`(172).toString(16);` ### --question-- #### --text-- -Placeholder question +Which of the following is the right way to convert a string to an integer? #### --distractors-- -Placeholder distractor 1 +`parseINT("300")` --- -Placeholder distractor 2 +`int("300")` --- -Placeholder distractor 3 +`integer("300")` #### --answer-- -Placeholder answer +`parseInt("300")` ### --question-- #### --text-- -Placeholder question +Which of the following statements is false? #### --distractors-- -Placeholder distractor 1 +`parseFloat()` ignores trailing invalid characters --- -Placeholder distractor 2 +`parseFloat()` can parse a string that begins with `Infinity` or `-Infinity` --- -Placeholder distractor 3 +`parseFloat("0x1f")` will return `0` #### --answer-- -Placeholder answer +`parseFloat()` requires two parameters ### --question-- #### --text-- -Placeholder question +Which of the following is false? #### --distractors-- -Placeholder distractor 1 +A number greater than 100 as an argument to the `Number.prototype.toFixed()` method will result to a range error --- -Placeholder distractor 2 +`Number.prototype.toFixed(numDecimalPlaces)` is used to return a number converted to a string with decimals places depending on the argument --- -Placeholder distractor 3 +Calling the `Number.prototype.toFixed()` method on a number object with decimal points and no argument will round the number to the nearest ones #### --answer-- -Placeholder answer +Using `Number.prototype.toFixed()` without an argument will by default add a decimal point followed by a zero ### --question-- #### --text-- -Placeholder question +Which of the following is not a comparison operator? #### --distractors-- -Placeholder distractor 1 +`!=` --- -Placeholder distractor 2 +`>=` --- -Placeholder distractor 3 +`===` #### --answer-- -Placeholder answer +`!>` ### --question-- #### --text-- -Placeholder question +Which of the following is false? #### --distractors-- -Placeholder distractor 1 +Exponentiation has a lower operator precedence than the grouping operator `()`. --- -Placeholder distractor 2 +Postfix operators like `x++` or `x--` has higher precedence than prefix operators. --- -Placeholder distractor 3 +Relational operators like `>` or `<` has higher precedence than equality operators. #### --answer-- -Placeholder answer +Logical operator like `AND` and `OR` have higher precedence than bitwise operators. ### --question-- #### --text-- -Placeholder question +`Math.random()` returns a number in what range? #### --distractors-- -Placeholder distractor 1 +`Math.random()` returns a number between 0 (inclusive) and 1 (inclusive) --- -Placeholder distractor 2 +`Math.random()` returns a number between 0 (exclusive) and 1 (inclusive) --- -Placeholder distractor 3 +`Math.random()` returns a number between 0 (exclusive) and 1 (exclusive) #### --answer-- -Placeholder answer +`Math.random()`returns a number between 0 (inclusive) and 1 (exclusive) diff --git a/curriculum/challenges/german/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md b/curriculum/challenges/german/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md index 80db215d68..1e4b48d22f 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md @@ -286,4 +286,7 @@ p{ ```html

text


Projects

text


``` -`css` + +```css + +``` diff --git a/curriculum/challenges/german/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md b/curriculum/challenges/german/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md index a8b6821d41..8867ec39b4 100644 --- a/curriculum/challenges/german/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md +++ b/curriculum/challenges/german/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md @@ -17,439 +17,475 @@ Answer all of the questions below correctly to pass the quiz. #### --text-- -Placeholder question +What is the result of this code? + +``` js +const num1 = Number('888'); +const num2 = new Number('777'); + +console.log(num1 === 888); +console.log(num2 === 777); +``` #### --distractors-- -Placeholder distractor 1 +```js +true +true +``` --- -Placeholder distractor 2 +```js +false +false +``` --- -Placeholder distractor 3 +```js +false +true +``` #### --answer-- -Placeholder answer +```js +true +false +``` ### --question-- #### --text-- -Placeholder question +Which of the following is not an arithmetic operator in JavaScript? #### --distractors-- -Placeholder distractor 1 +`%` --- -Placeholder distractor 2 +`+` --- -Placeholder distractor 3 +`--` #### --answer-- -Placeholder answer +`==` ### --question-- #### --text-- -Placeholder question +Which of the following will log the correct gross profit? #### --distractors-- -Placeholder distractor 1 +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + store1_sales + store2_sales); +``` --- -Placeholder distractor 2 +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + store1_sales - store2_sales); +``` --- -Placeholder distractor 3 +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + (store1_sales - store2_sales)); +``` #### --answer-- -Placeholder answer +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + (store1_sales + store2_sales)); +``` ### --question-- #### --text-- -Placeholder question +What is the result of the statement `25 * 4 - 16 / (2 * 4) + 8`? #### --distractors-- -Placeholder distractor 1 +`18.5` --- -Placeholder distractor 2 +`107.5` --- -Placeholder distractor 3 +`17` #### --answer-- -Placeholder answer +`106` ### --question-- #### --text-- -Placeholder question +Which operator should you use when decrementing a variable in JavaScript? #### --distractors-- -Placeholder distractor 1 +`++` --- -Placeholder distractor 2 +`//` --- -Placeholder distractor 3 +`**` #### --answer-- -Placeholder answer +`--` ### --question-- #### --text-- -Placeholder question +Which of the following is not a bitwise operator? #### --distractors-- -Placeholder distractor 1 +`&` --- -Placeholder distractor 2 +`|` --- -Placeholder distractor 3 +`^` #### --answer-- -Placeholder answer +`>` ### --question-- #### --text-- -Placeholder question +Which of the following is the correct compound operator for getting the remainder? #### --distractors-- -Placeholder distractor 1 +`//=` --- -Placeholder distractor 2 +`\=` --- -Placeholder distractor 3 +`%%=` #### --answer-- -Placeholder answer +`%=` ### --question-- #### --text-- -Placeholder question +What is the difference between the `==` and `===` operators? #### --distractors-- -Placeholder distractor 1 +There is no difference. The comparison result will always have the same result. --- -Placeholder distractor 2 +The `==` operator is used to check if the data type is the same while the `===` is used to check if the value is equal. --- -Placeholder distractor 3 +The `==` operator can only be used with primitive types while the `===` operator is only used for objects. #### --answer-- -Placeholder answer +The `==` operator only compares values whereas the `===` operator compares values and types. ### --question-- #### --text-- -Placeholder question +Which of the following statements are false about unary plus (`+`) operators? #### --distractors-- -Placeholder distractor 1 +It tries to convert the operand into a number. --- -Placeholder distractor 2 +It is the fastest way to convert an operand to a number. --- -Placeholder distractor 3 +It can convert operands with negative numbers except for hexadecimals. #### --answer-- -Placeholder answer +It can't convert `true`, `false`, or `null` into a number. ### --question-- #### --text-- -Placeholder question +Which method in the built-in Math object is used to round up a number? #### --distractors-- -Placeholder distractor 1 +`Math.round(num)` --- -Placeholder distractor 2 +`Math.floor(num)` --- -Placeholder distractor 3 +`Math.fround(num)` #### --answer-- -Placeholder answer +`Math.ceil(num)` ### --question-- #### --text-- -Placeholder question +Which of the following Math object methods are used to raise a base to a power? #### --distractors-- -Placeholder distractor 1 +`Math.exp(base, power)` --- -Placeholder distractor 2 +`Math.raise(base, power)` --- -Placeholder distractor 3 +`Math.e(base, power)` #### --answer-- -Placeholder answer +`Math.pow(base, power)` ### --question-- #### --text-- -Placeholder question +Which of the following is the correct method for generating a random number in JavaScript? #### --distractors-- -Placeholder distractor 1 +`Math.rand(1,10)` --- -Placeholder distractor 2 +`Math.rand()` --- -Placeholder distractor 3 +`Math.random(1,10)` #### --answer-- -Placeholder answer +`Math.random()` ### --question-- #### --text-- -Placeholder question +Which of the following will return `false`? #### --distractors-- -Placeholder distractor 1 +`isNaN("1998", "1999")` --- -Placeholder distractor 2 +`isNaN({})` --- -Placeholder distractor 3 +`isNaN(undefined)` #### --answer-- -Placeholder answer +`isNaN(null)` ### --question-- #### --text-- -Placeholder question +Which of the following will convert `172` to its hexadecimal equivalent? #### --distractors-- -Placeholder distractor 1 +`(-0xa5).toString(2);` --- -Placeholder distractor 2 +`(172).string(0x);` --- -Placeholder distractor 3 +`(172).parseString(0x);` #### --answer-- -Placeholder answer +`(172).toString(16);` ### --question-- #### --text-- -Placeholder question +Which of the following is the right way to convert a string to an integer? #### --distractors-- -Placeholder distractor 1 +`parseINT("300")` --- -Placeholder distractor 2 +`int("300")` --- -Placeholder distractor 3 +`integer("300")` #### --answer-- -Placeholder answer +`parseInt("300")` ### --question-- #### --text-- -Placeholder question +Which of the following statements is false? #### --distractors-- -Placeholder distractor 1 +`parseFloat()` ignores trailing invalid characters --- -Placeholder distractor 2 +`parseFloat()` can parse a string that begins with `Infinity` or `-Infinity` --- -Placeholder distractor 3 +`parseFloat("0x1f")` will return `0` #### --answer-- -Placeholder answer +`parseFloat()` requires two parameters ### --question-- #### --text-- -Placeholder question +Which of the following is false? #### --distractors-- -Placeholder distractor 1 +A number greater than 100 as an argument to the `Number.prototype.toFixed()` method will result to a range error --- -Placeholder distractor 2 +`Number.prototype.toFixed(numDecimalPlaces)` is used to return a number converted to a string with decimals places depending on the argument --- -Placeholder distractor 3 +Calling the `Number.prototype.toFixed()` method on a number object with decimal points and no argument will round the number to the nearest ones #### --answer-- -Placeholder answer +Using `Number.prototype.toFixed()` without an argument will by default add a decimal point followed by a zero ### --question-- #### --text-- -Placeholder question +Which of the following is not a comparison operator? #### --distractors-- -Placeholder distractor 1 +`!=` --- -Placeholder distractor 2 +`>=` --- -Placeholder distractor 3 +`===` #### --answer-- -Placeholder answer +`!>` ### --question-- #### --text-- -Placeholder question +Which of the following is false? #### --distractors-- -Placeholder distractor 1 +Exponentiation has a lower operator precedence than the grouping operator `()`. --- -Placeholder distractor 2 +Postfix operators like `x++` or `x--` has higher precedence than prefix operators. --- -Placeholder distractor 3 +Relational operators like `>` or `<` has higher precedence than equality operators. #### --answer-- -Placeholder answer +Logical operator like `AND` and `OR` have higher precedence than bitwise operators. ### --question-- #### --text-- -Placeholder question +`Math.random()` returns a number in what range? #### --distractors-- -Placeholder distractor 1 +`Math.random()` returns a number between 0 (inclusive) and 1 (inclusive) --- -Placeholder distractor 2 +`Math.random()` returns a number between 0 (exclusive) and 1 (inclusive) --- -Placeholder distractor 3 +`Math.random()` returns a number between 0 (exclusive) and 1 (exclusive) #### --answer-- -Placeholder answer +`Math.random()`returns a number between 0 (inclusive) and 1 (exclusive) diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md b/curriculum/challenges/italian/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md index 24e9a50e89..da7a4c0335 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md @@ -286,4 +286,7 @@ p{ ```html

text


Projects

text


``` -`css` + +```css + +``` diff --git a/curriculum/challenges/italian/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md b/curriculum/challenges/italian/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md index a8b6821d41..8867ec39b4 100644 --- a/curriculum/challenges/italian/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md +++ b/curriculum/challenges/italian/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md @@ -17,439 +17,475 @@ Answer all of the questions below correctly to pass the quiz. #### --text-- -Placeholder question +What is the result of this code? + +``` js +const num1 = Number('888'); +const num2 = new Number('777'); + +console.log(num1 === 888); +console.log(num2 === 777); +``` #### --distractors-- -Placeholder distractor 1 +```js +true +true +``` --- -Placeholder distractor 2 +```js +false +false +``` --- -Placeholder distractor 3 +```js +false +true +``` #### --answer-- -Placeholder answer +```js +true +false +``` ### --question-- #### --text-- -Placeholder question +Which of the following is not an arithmetic operator in JavaScript? #### --distractors-- -Placeholder distractor 1 +`%` --- -Placeholder distractor 2 +`+` --- -Placeholder distractor 3 +`--` #### --answer-- -Placeholder answer +`==` ### --question-- #### --text-- -Placeholder question +Which of the following will log the correct gross profit? #### --distractors-- -Placeholder distractor 1 +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + store1_sales + store2_sales); +``` --- -Placeholder distractor 2 +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + store1_sales - store2_sales); +``` --- -Placeholder distractor 3 +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + (store1_sales - store2_sales)); +``` #### --answer-- -Placeholder answer +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + (store1_sales + store2_sales)); +``` ### --question-- #### --text-- -Placeholder question +What is the result of the statement `25 * 4 - 16 / (2 * 4) + 8`? #### --distractors-- -Placeholder distractor 1 +`18.5` --- -Placeholder distractor 2 +`107.5` --- -Placeholder distractor 3 +`17` #### --answer-- -Placeholder answer +`106` ### --question-- #### --text-- -Placeholder question +Which operator should you use when decrementing a variable in JavaScript? #### --distractors-- -Placeholder distractor 1 +`++` --- -Placeholder distractor 2 +`//` --- -Placeholder distractor 3 +`**` #### --answer-- -Placeholder answer +`--` ### --question-- #### --text-- -Placeholder question +Which of the following is not a bitwise operator? #### --distractors-- -Placeholder distractor 1 +`&` --- -Placeholder distractor 2 +`|` --- -Placeholder distractor 3 +`^` #### --answer-- -Placeholder answer +`>` ### --question-- #### --text-- -Placeholder question +Which of the following is the correct compound operator for getting the remainder? #### --distractors-- -Placeholder distractor 1 +`//=` --- -Placeholder distractor 2 +`\=` --- -Placeholder distractor 3 +`%%=` #### --answer-- -Placeholder answer +`%=` ### --question-- #### --text-- -Placeholder question +What is the difference between the `==` and `===` operators? #### --distractors-- -Placeholder distractor 1 +There is no difference. The comparison result will always have the same result. --- -Placeholder distractor 2 +The `==` operator is used to check if the data type is the same while the `===` is used to check if the value is equal. --- -Placeholder distractor 3 +The `==` operator can only be used with primitive types while the `===` operator is only used for objects. #### --answer-- -Placeholder answer +The `==` operator only compares values whereas the `===` operator compares values and types. ### --question-- #### --text-- -Placeholder question +Which of the following statements are false about unary plus (`+`) operators? #### --distractors-- -Placeholder distractor 1 +It tries to convert the operand into a number. --- -Placeholder distractor 2 +It is the fastest way to convert an operand to a number. --- -Placeholder distractor 3 +It can convert operands with negative numbers except for hexadecimals. #### --answer-- -Placeholder answer +It can't convert `true`, `false`, or `null` into a number. ### --question-- #### --text-- -Placeholder question +Which method in the built-in Math object is used to round up a number? #### --distractors-- -Placeholder distractor 1 +`Math.round(num)` --- -Placeholder distractor 2 +`Math.floor(num)` --- -Placeholder distractor 3 +`Math.fround(num)` #### --answer-- -Placeholder answer +`Math.ceil(num)` ### --question-- #### --text-- -Placeholder question +Which of the following Math object methods are used to raise a base to a power? #### --distractors-- -Placeholder distractor 1 +`Math.exp(base, power)` --- -Placeholder distractor 2 +`Math.raise(base, power)` --- -Placeholder distractor 3 +`Math.e(base, power)` #### --answer-- -Placeholder answer +`Math.pow(base, power)` ### --question-- #### --text-- -Placeholder question +Which of the following is the correct method for generating a random number in JavaScript? #### --distractors-- -Placeholder distractor 1 +`Math.rand(1,10)` --- -Placeholder distractor 2 +`Math.rand()` --- -Placeholder distractor 3 +`Math.random(1,10)` #### --answer-- -Placeholder answer +`Math.random()` ### --question-- #### --text-- -Placeholder question +Which of the following will return `false`? #### --distractors-- -Placeholder distractor 1 +`isNaN("1998", "1999")` --- -Placeholder distractor 2 +`isNaN({})` --- -Placeholder distractor 3 +`isNaN(undefined)` #### --answer-- -Placeholder answer +`isNaN(null)` ### --question-- #### --text-- -Placeholder question +Which of the following will convert `172` to its hexadecimal equivalent? #### --distractors-- -Placeholder distractor 1 +`(-0xa5).toString(2);` --- -Placeholder distractor 2 +`(172).string(0x);` --- -Placeholder distractor 3 +`(172).parseString(0x);` #### --answer-- -Placeholder answer +`(172).toString(16);` ### --question-- #### --text-- -Placeholder question +Which of the following is the right way to convert a string to an integer? #### --distractors-- -Placeholder distractor 1 +`parseINT("300")` --- -Placeholder distractor 2 +`int("300")` --- -Placeholder distractor 3 +`integer("300")` #### --answer-- -Placeholder answer +`parseInt("300")` ### --question-- #### --text-- -Placeholder question +Which of the following statements is false? #### --distractors-- -Placeholder distractor 1 +`parseFloat()` ignores trailing invalid characters --- -Placeholder distractor 2 +`parseFloat()` can parse a string that begins with `Infinity` or `-Infinity` --- -Placeholder distractor 3 +`parseFloat("0x1f")` will return `0` #### --answer-- -Placeholder answer +`parseFloat()` requires two parameters ### --question-- #### --text-- -Placeholder question +Which of the following is false? #### --distractors-- -Placeholder distractor 1 +A number greater than 100 as an argument to the `Number.prototype.toFixed()` method will result to a range error --- -Placeholder distractor 2 +`Number.prototype.toFixed(numDecimalPlaces)` is used to return a number converted to a string with decimals places depending on the argument --- -Placeholder distractor 3 +Calling the `Number.prototype.toFixed()` method on a number object with decimal points and no argument will round the number to the nearest ones #### --answer-- -Placeholder answer +Using `Number.prototype.toFixed()` without an argument will by default add a decimal point followed by a zero ### --question-- #### --text-- -Placeholder question +Which of the following is not a comparison operator? #### --distractors-- -Placeholder distractor 1 +`!=` --- -Placeholder distractor 2 +`>=` --- -Placeholder distractor 3 +`===` #### --answer-- -Placeholder answer +`!>` ### --question-- #### --text-- -Placeholder question +Which of the following is false? #### --distractors-- -Placeholder distractor 1 +Exponentiation has a lower operator precedence than the grouping operator `()`. --- -Placeholder distractor 2 +Postfix operators like `x++` or `x--` has higher precedence than prefix operators. --- -Placeholder distractor 3 +Relational operators like `>` or `<` has higher precedence than equality operators. #### --answer-- -Placeholder answer +Logical operator like `AND` and `OR` have higher precedence than bitwise operators. ### --question-- #### --text-- -Placeholder question +`Math.random()` returns a number in what range? #### --distractors-- -Placeholder distractor 1 +`Math.random()` returns a number between 0 (inclusive) and 1 (inclusive) --- -Placeholder distractor 2 +`Math.random()` returns a number between 0 (exclusive) and 1 (inclusive) --- -Placeholder distractor 3 +`Math.random()` returns a number between 0 (exclusive) and 1 (exclusive) #### --answer-- -Placeholder answer +`Math.random()`returns a number between 0 (inclusive) and 1 (exclusive) diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md b/curriculum/challenges/japanese/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md index bc52a4192e..7609f12623 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md @@ -286,4 +286,7 @@ p{ ```html

text


Projects

text


``` -`css` + +```css + +``` diff --git a/curriculum/challenges/japanese/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md b/curriculum/challenges/japanese/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md index a8b6821d41..8867ec39b4 100644 --- a/curriculum/challenges/japanese/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md +++ b/curriculum/challenges/japanese/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md @@ -17,439 +17,475 @@ Answer all of the questions below correctly to pass the quiz. #### --text-- -Placeholder question +What is the result of this code? + +``` js +const num1 = Number('888'); +const num2 = new Number('777'); + +console.log(num1 === 888); +console.log(num2 === 777); +``` #### --distractors-- -Placeholder distractor 1 +```js +true +true +``` --- -Placeholder distractor 2 +```js +false +false +``` --- -Placeholder distractor 3 +```js +false +true +``` #### --answer-- -Placeholder answer +```js +true +false +``` ### --question-- #### --text-- -Placeholder question +Which of the following is not an arithmetic operator in JavaScript? #### --distractors-- -Placeholder distractor 1 +`%` --- -Placeholder distractor 2 +`+` --- -Placeholder distractor 3 +`--` #### --answer-- -Placeholder answer +`==` ### --question-- #### --text-- -Placeholder question +Which of the following will log the correct gross profit? #### --distractors-- -Placeholder distractor 1 +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + store1_sales + store2_sales); +``` --- -Placeholder distractor 2 +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + store1_sales - store2_sales); +``` --- -Placeholder distractor 3 +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + (store1_sales - store2_sales)); +``` #### --answer-- -Placeholder answer +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + (store1_sales + store2_sales)); +``` ### --question-- #### --text-- -Placeholder question +What is the result of the statement `25 * 4 - 16 / (2 * 4) + 8`? #### --distractors-- -Placeholder distractor 1 +`18.5` --- -Placeholder distractor 2 +`107.5` --- -Placeholder distractor 3 +`17` #### --answer-- -Placeholder answer +`106` ### --question-- #### --text-- -Placeholder question +Which operator should you use when decrementing a variable in JavaScript? #### --distractors-- -Placeholder distractor 1 +`++` --- -Placeholder distractor 2 +`//` --- -Placeholder distractor 3 +`**` #### --answer-- -Placeholder answer +`--` ### --question-- #### --text-- -Placeholder question +Which of the following is not a bitwise operator? #### --distractors-- -Placeholder distractor 1 +`&` --- -Placeholder distractor 2 +`|` --- -Placeholder distractor 3 +`^` #### --answer-- -Placeholder answer +`>` ### --question-- #### --text-- -Placeholder question +Which of the following is the correct compound operator for getting the remainder? #### --distractors-- -Placeholder distractor 1 +`//=` --- -Placeholder distractor 2 +`\=` --- -Placeholder distractor 3 +`%%=` #### --answer-- -Placeholder answer +`%=` ### --question-- #### --text-- -Placeholder question +What is the difference between the `==` and `===` operators? #### --distractors-- -Placeholder distractor 1 +There is no difference. The comparison result will always have the same result. --- -Placeholder distractor 2 +The `==` operator is used to check if the data type is the same while the `===` is used to check if the value is equal. --- -Placeholder distractor 3 +The `==` operator can only be used with primitive types while the `===` operator is only used for objects. #### --answer-- -Placeholder answer +The `==` operator only compares values whereas the `===` operator compares values and types. ### --question-- #### --text-- -Placeholder question +Which of the following statements are false about unary plus (`+`) operators? #### --distractors-- -Placeholder distractor 1 +It tries to convert the operand into a number. --- -Placeholder distractor 2 +It is the fastest way to convert an operand to a number. --- -Placeholder distractor 3 +It can convert operands with negative numbers except for hexadecimals. #### --answer-- -Placeholder answer +It can't convert `true`, `false`, or `null` into a number. ### --question-- #### --text-- -Placeholder question +Which method in the built-in Math object is used to round up a number? #### --distractors-- -Placeholder distractor 1 +`Math.round(num)` --- -Placeholder distractor 2 +`Math.floor(num)` --- -Placeholder distractor 3 +`Math.fround(num)` #### --answer-- -Placeholder answer +`Math.ceil(num)` ### --question-- #### --text-- -Placeholder question +Which of the following Math object methods are used to raise a base to a power? #### --distractors-- -Placeholder distractor 1 +`Math.exp(base, power)` --- -Placeholder distractor 2 +`Math.raise(base, power)` --- -Placeholder distractor 3 +`Math.e(base, power)` #### --answer-- -Placeholder answer +`Math.pow(base, power)` ### --question-- #### --text-- -Placeholder question +Which of the following is the correct method for generating a random number in JavaScript? #### --distractors-- -Placeholder distractor 1 +`Math.rand(1,10)` --- -Placeholder distractor 2 +`Math.rand()` --- -Placeholder distractor 3 +`Math.random(1,10)` #### --answer-- -Placeholder answer +`Math.random()` ### --question-- #### --text-- -Placeholder question +Which of the following will return `false`? #### --distractors-- -Placeholder distractor 1 +`isNaN("1998", "1999")` --- -Placeholder distractor 2 +`isNaN({})` --- -Placeholder distractor 3 +`isNaN(undefined)` #### --answer-- -Placeholder answer +`isNaN(null)` ### --question-- #### --text-- -Placeholder question +Which of the following will convert `172` to its hexadecimal equivalent? #### --distractors-- -Placeholder distractor 1 +`(-0xa5).toString(2);` --- -Placeholder distractor 2 +`(172).string(0x);` --- -Placeholder distractor 3 +`(172).parseString(0x);` #### --answer-- -Placeholder answer +`(172).toString(16);` ### --question-- #### --text-- -Placeholder question +Which of the following is the right way to convert a string to an integer? #### --distractors-- -Placeholder distractor 1 +`parseINT("300")` --- -Placeholder distractor 2 +`int("300")` --- -Placeholder distractor 3 +`integer("300")` #### --answer-- -Placeholder answer +`parseInt("300")` ### --question-- #### --text-- -Placeholder question +Which of the following statements is false? #### --distractors-- -Placeholder distractor 1 +`parseFloat()` ignores trailing invalid characters --- -Placeholder distractor 2 +`parseFloat()` can parse a string that begins with `Infinity` or `-Infinity` --- -Placeholder distractor 3 +`parseFloat("0x1f")` will return `0` #### --answer-- -Placeholder answer +`parseFloat()` requires two parameters ### --question-- #### --text-- -Placeholder question +Which of the following is false? #### --distractors-- -Placeholder distractor 1 +A number greater than 100 as an argument to the `Number.prototype.toFixed()` method will result to a range error --- -Placeholder distractor 2 +`Number.prototype.toFixed(numDecimalPlaces)` is used to return a number converted to a string with decimals places depending on the argument --- -Placeholder distractor 3 +Calling the `Number.prototype.toFixed()` method on a number object with decimal points and no argument will round the number to the nearest ones #### --answer-- -Placeholder answer +Using `Number.prototype.toFixed()` without an argument will by default add a decimal point followed by a zero ### --question-- #### --text-- -Placeholder question +Which of the following is not a comparison operator? #### --distractors-- -Placeholder distractor 1 +`!=` --- -Placeholder distractor 2 +`>=` --- -Placeholder distractor 3 +`===` #### --answer-- -Placeholder answer +`!>` ### --question-- #### --text-- -Placeholder question +Which of the following is false? #### --distractors-- -Placeholder distractor 1 +Exponentiation has a lower operator precedence than the grouping operator `()`. --- -Placeholder distractor 2 +Postfix operators like `x++` or `x--` has higher precedence than prefix operators. --- -Placeholder distractor 3 +Relational operators like `>` or `<` has higher precedence than equality operators. #### --answer-- -Placeholder answer +Logical operator like `AND` and `OR` have higher precedence than bitwise operators. ### --question-- #### --text-- -Placeholder question +`Math.random()` returns a number in what range? #### --distractors-- -Placeholder distractor 1 +`Math.random()` returns a number between 0 (inclusive) and 1 (inclusive) --- -Placeholder distractor 2 +`Math.random()` returns a number between 0 (exclusive) and 1 (inclusive) --- -Placeholder distractor 3 +`Math.random()` returns a number between 0 (exclusive) and 1 (exclusive) #### --answer-- -Placeholder answer +`Math.random()`returns a number between 0 (inclusive) and 1 (exclusive) diff --git a/curriculum/challenges/korean/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md b/curriculum/challenges/korean/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md index 9b10e9a8cd..09b17c4849 100644 --- a/curriculum/challenges/korean/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md +++ b/curriculum/challenges/korean/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md @@ -286,4 +286,7 @@ p{ ```html

text


Projects

text


``` -`css` + +```css + +``` diff --git a/curriculum/challenges/korean/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md b/curriculum/challenges/korean/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md index a8b6821d41..8867ec39b4 100644 --- a/curriculum/challenges/korean/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md +++ b/curriculum/challenges/korean/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md @@ -17,439 +17,475 @@ Answer all of the questions below correctly to pass the quiz. #### --text-- -Placeholder question +What is the result of this code? + +``` js +const num1 = Number('888'); +const num2 = new Number('777'); + +console.log(num1 === 888); +console.log(num2 === 777); +``` #### --distractors-- -Placeholder distractor 1 +```js +true +true +``` --- -Placeholder distractor 2 +```js +false +false +``` --- -Placeholder distractor 3 +```js +false +true +``` #### --answer-- -Placeholder answer +```js +true +false +``` ### --question-- #### --text-- -Placeholder question +Which of the following is not an arithmetic operator in JavaScript? #### --distractors-- -Placeholder distractor 1 +`%` --- -Placeholder distractor 2 +`+` --- -Placeholder distractor 3 +`--` #### --answer-- -Placeholder answer +`==` ### --question-- #### --text-- -Placeholder question +Which of the following will log the correct gross profit? #### --distractors-- -Placeholder distractor 1 +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + store1_sales + store2_sales); +``` --- -Placeholder distractor 2 +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + store1_sales - store2_sales); +``` --- -Placeholder distractor 3 +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + (store1_sales - store2_sales)); +``` #### --answer-- -Placeholder answer +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + (store1_sales + store2_sales)); +``` ### --question-- #### --text-- -Placeholder question +What is the result of the statement `25 * 4 - 16 / (2 * 4) + 8`? #### --distractors-- -Placeholder distractor 1 +`18.5` --- -Placeholder distractor 2 +`107.5` --- -Placeholder distractor 3 +`17` #### --answer-- -Placeholder answer +`106` ### --question-- #### --text-- -Placeholder question +Which operator should you use when decrementing a variable in JavaScript? #### --distractors-- -Placeholder distractor 1 +`++` --- -Placeholder distractor 2 +`//` --- -Placeholder distractor 3 +`**` #### --answer-- -Placeholder answer +`--` ### --question-- #### --text-- -Placeholder question +Which of the following is not a bitwise operator? #### --distractors-- -Placeholder distractor 1 +`&` --- -Placeholder distractor 2 +`|` --- -Placeholder distractor 3 +`^` #### --answer-- -Placeholder answer +`>` ### --question-- #### --text-- -Placeholder question +Which of the following is the correct compound operator for getting the remainder? #### --distractors-- -Placeholder distractor 1 +`//=` --- -Placeholder distractor 2 +`\=` --- -Placeholder distractor 3 +`%%=` #### --answer-- -Placeholder answer +`%=` ### --question-- #### --text-- -Placeholder question +What is the difference between the `==` and `===` operators? #### --distractors-- -Placeholder distractor 1 +There is no difference. The comparison result will always have the same result. --- -Placeholder distractor 2 +The `==` operator is used to check if the data type is the same while the `===` is used to check if the value is equal. --- -Placeholder distractor 3 +The `==` operator can only be used with primitive types while the `===` operator is only used for objects. #### --answer-- -Placeholder answer +The `==` operator only compares values whereas the `===` operator compares values and types. ### --question-- #### --text-- -Placeholder question +Which of the following statements are false about unary plus (`+`) operators? #### --distractors-- -Placeholder distractor 1 +It tries to convert the operand into a number. --- -Placeholder distractor 2 +It is the fastest way to convert an operand to a number. --- -Placeholder distractor 3 +It can convert operands with negative numbers except for hexadecimals. #### --answer-- -Placeholder answer +It can't convert `true`, `false`, or `null` into a number. ### --question-- #### --text-- -Placeholder question +Which method in the built-in Math object is used to round up a number? #### --distractors-- -Placeholder distractor 1 +`Math.round(num)` --- -Placeholder distractor 2 +`Math.floor(num)` --- -Placeholder distractor 3 +`Math.fround(num)` #### --answer-- -Placeholder answer +`Math.ceil(num)` ### --question-- #### --text-- -Placeholder question +Which of the following Math object methods are used to raise a base to a power? #### --distractors-- -Placeholder distractor 1 +`Math.exp(base, power)` --- -Placeholder distractor 2 +`Math.raise(base, power)` --- -Placeholder distractor 3 +`Math.e(base, power)` #### --answer-- -Placeholder answer +`Math.pow(base, power)` ### --question-- #### --text-- -Placeholder question +Which of the following is the correct method for generating a random number in JavaScript? #### --distractors-- -Placeholder distractor 1 +`Math.rand(1,10)` --- -Placeholder distractor 2 +`Math.rand()` --- -Placeholder distractor 3 +`Math.random(1,10)` #### --answer-- -Placeholder answer +`Math.random()` ### --question-- #### --text-- -Placeholder question +Which of the following will return `false`? #### --distractors-- -Placeholder distractor 1 +`isNaN("1998", "1999")` --- -Placeholder distractor 2 +`isNaN({})` --- -Placeholder distractor 3 +`isNaN(undefined)` #### --answer-- -Placeholder answer +`isNaN(null)` ### --question-- #### --text-- -Placeholder question +Which of the following will convert `172` to its hexadecimal equivalent? #### --distractors-- -Placeholder distractor 1 +`(-0xa5).toString(2);` --- -Placeholder distractor 2 +`(172).string(0x);` --- -Placeholder distractor 3 +`(172).parseString(0x);` #### --answer-- -Placeholder answer +`(172).toString(16);` ### --question-- #### --text-- -Placeholder question +Which of the following is the right way to convert a string to an integer? #### --distractors-- -Placeholder distractor 1 +`parseINT("300")` --- -Placeholder distractor 2 +`int("300")` --- -Placeholder distractor 3 +`integer("300")` #### --answer-- -Placeholder answer +`parseInt("300")` ### --question-- #### --text-- -Placeholder question +Which of the following statements is false? #### --distractors-- -Placeholder distractor 1 +`parseFloat()` ignores trailing invalid characters --- -Placeholder distractor 2 +`parseFloat()` can parse a string that begins with `Infinity` or `-Infinity` --- -Placeholder distractor 3 +`parseFloat("0x1f")` will return `0` #### --answer-- -Placeholder answer +`parseFloat()` requires two parameters ### --question-- #### --text-- -Placeholder question +Which of the following is false? #### --distractors-- -Placeholder distractor 1 +A number greater than 100 as an argument to the `Number.prototype.toFixed()` method will result to a range error --- -Placeholder distractor 2 +`Number.prototype.toFixed(numDecimalPlaces)` is used to return a number converted to a string with decimals places depending on the argument --- -Placeholder distractor 3 +Calling the `Number.prototype.toFixed()` method on a number object with decimal points and no argument will round the number to the nearest ones #### --answer-- -Placeholder answer +Using `Number.prototype.toFixed()` without an argument will by default add a decimal point followed by a zero ### --question-- #### --text-- -Placeholder question +Which of the following is not a comparison operator? #### --distractors-- -Placeholder distractor 1 +`!=` --- -Placeholder distractor 2 +`>=` --- -Placeholder distractor 3 +`===` #### --answer-- -Placeholder answer +`!>` ### --question-- #### --text-- -Placeholder question +Which of the following is false? #### --distractors-- -Placeholder distractor 1 +Exponentiation has a lower operator precedence than the grouping operator `()`. --- -Placeholder distractor 2 +Postfix operators like `x++` or `x--` has higher precedence than prefix operators. --- -Placeholder distractor 3 +Relational operators like `>` or `<` has higher precedence than equality operators. #### --answer-- -Placeholder answer +Logical operator like `AND` and `OR` have higher precedence than bitwise operators. ### --question-- #### --text-- -Placeholder question +`Math.random()` returns a number in what range? #### --distractors-- -Placeholder distractor 1 +`Math.random()` returns a number between 0 (inclusive) and 1 (inclusive) --- -Placeholder distractor 2 +`Math.random()` returns a number between 0 (exclusive) and 1 (inclusive) --- -Placeholder distractor 3 +`Math.random()` returns a number between 0 (exclusive) and 1 (exclusive) #### --answer-- -Placeholder answer +`Math.random()`returns a number between 0 (inclusive) and 1 (exclusive) diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md index 422bc6b165..84e5a225f6 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md @@ -286,4 +286,7 @@ p{ ```html

text


Projects

text


``` -`css` + +```css + +``` diff --git a/curriculum/challenges/portuguese/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md b/curriculum/challenges/portuguese/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md index d28a0a891f..2f79b96764 100644 --- a/curriculum/challenges/portuguese/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md +++ b/curriculum/challenges/portuguese/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md @@ -17,439 +17,475 @@ Answer all of the questions below correctly to pass the quiz. #### --text-- -Placeholder question +What is the result of this code? + +``` js +const num1 = Number('888'); +const num2 = new Number('777'); + +console.log(num1 === 888); +console.log(num2 === 777); +``` #### --distractors-- -Placeholder distractor 1 +```js +true +true +``` --- -Placeholder distractor 2 +```js +false +false +``` --- -Placeholder distractor 3 +```js +false +true +``` #### --answer-- -Placeholder answer +```js +true +false +``` ### --question-- #### --text-- -Placeholder question +Which of the following is not an arithmetic operator in JavaScript? #### --distractors-- -Placeholder distractor 1 +`%` --- -Placeholder distractor 2 +`+` --- -Placeholder distractor 3 +`--` #### --answer-- -Placeholder answer +`==` ### --question-- #### --text-- -Placeholder question +Which of the following will log the correct gross profit? #### --distractors-- -Placeholder distractor 1 +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + store1_sales + store2_sales); +``` --- -Placeholder distractor 2 +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + store1_sales - store2_sales); +``` --- -Placeholder distractor 3 +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + (store1_sales - store2_sales)); +``` #### --answer-- -Placeholder answer +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + (store1_sales + store2_sales)); +``` ### --question-- #### --text-- -Placeholder question +What is the result of the statement `25 * 4 - 16 / (2 * 4) + 8`? #### --distractors-- -Placeholder distractor 1 +`18.5` --- -Placeholder distractor 2 +`107.5` --- -Placeholder distractor 3 +`17` #### --answer-- -Placeholder answer +`106` ### --question-- #### --text-- -Placeholder question +Which operator should you use when decrementing a variable in JavaScript? #### --distractors-- -Placeholder distractor 1 +`++` --- -Placeholder distractor 2 +`//` --- -Placeholder distractor 3 +`**` #### --answer-- -Placeholder answer +`--` ### --question-- #### --text-- -Placeholder question +Which of the following is not a bitwise operator? #### --distractors-- -Placeholder distractor 1 +`&` --- -Placeholder distractor 2 +`|` --- -Placeholder distractor 3 +`^` #### --answer-- -Placeholder answer +`>` ### --question-- #### --text-- -Placeholder question +Which of the following is the correct compound operator for getting the remainder? #### --distractors-- -Placeholder distractor 1 +`//=` --- -Placeholder distractor 2 +`\=` --- -Placeholder distractor 3 +`%%=` #### --answer-- -Placeholder answer +`%=` ### --question-- #### --text-- -Placeholder question +What is the difference between the `==` and `===` operators? #### --distractors-- -Placeholder distractor 1 +There is no difference. The comparison result will always have the same result. --- -Placeholder distractor 2 +The `==` operator is used to check if the data type is the same while the `===` is used to check if the value is equal. --- -Placeholder distractor 3 +The `==` operator can only be used with primitive types while the `===` operator is only used for objects. #### --answer-- -Placeholder answer +The `==` operator only compares values whereas the `===` operator compares values and types. ### --question-- #### --text-- -Placeholder question +Which of the following statements are false about unary plus (`+`) operators? #### --distractors-- -Placeholder distractor 1 +It tries to convert the operand into a number. --- -Placeholder distractor 2 +It is the fastest way to convert an operand to a number. --- -Placeholder distractor 3 +It can convert operands with negative numbers except for hexadecimals. #### --answer-- -Placeholder answer +It can't convert `true`, `false`, or `null` into a number. ### --question-- #### --text-- -Placeholder question +Which method in the built-in Math object is used to round up a number? #### --distractors-- -Placeholder distractor 1 +`Math.round(num)` --- -Placeholder distractor 2 +`Math.floor(num)` --- -Placeholder distractor 3 +`Math.fround(num)` #### --answer-- -Placeholder answer +`Math.ceil(num)` ### --question-- #### --text-- -Placeholder question +Which of the following Math object methods are used to raise a base to a power? #### --distractors-- -Placeholder distractor 1 +`Math.exp(base, power)` --- -Placeholder distractor 2 +`Math.raise(base, power)` --- -Placeholder distractor 3 +`Math.e(base, power)` #### --answer-- -Placeholder answer +`Math.pow(base, power)` ### --question-- #### --text-- -Placeholder question +Which of the following is the correct method for generating a random number in JavaScript? #### --distractors-- -Placeholder distractor 1 +`Math.rand(1,10)` --- -Placeholder distractor 2 +`Math.rand()` --- -Placeholder distractor 3 +`Math.random(1,10)` #### --answer-- -Placeholder answer +`Math.random()` ### --question-- #### --text-- -Placeholder question +Which of the following will return `false`? #### --distractors-- -Placeholder distractor 1 +`isNaN("1998", "1999")` --- -Placeholder distractor 2 +`isNaN({})` --- -Placeholder distractor 3 +`isNaN(undefined)` #### --answer-- -Placeholder answer +`isNaN(null)` ### --question-- #### --text-- -Placeholder question +Which of the following will convert `172` to its hexadecimal equivalent? #### --distractors-- -Placeholder distractor 1 +`(-0xa5).toString(2);` --- -Placeholder distractor 2 +`(172).string(0x);` --- -Placeholder distractor 3 +`(172).parseString(0x);` #### --answer-- -Placeholder answer +`(172).toString(16);` ### --question-- #### --text-- -Placeholder question +Which of the following is the right way to convert a string to an integer? #### --distractors-- -Placeholder distractor 1 +`parseINT("300")` --- -Placeholder distractor 2 +`int("300")` --- -Placeholder distractor 3 +`integer("300")` #### --answer-- -Placeholder answer +`parseInt("300")` ### --question-- #### --text-- -Placeholder question +Which of the following statements is false? #### --distractors-- -Placeholder distractor 1 +`parseFloat()` ignores trailing invalid characters --- -Placeholder distractor 2 +`parseFloat()` can parse a string that begins with `Infinity` or `-Infinity` --- -Placeholder distractor 3 +`parseFloat("0x1f")` will return `0` #### --answer-- -Placeholder answer +`parseFloat()` requires two parameters ### --question-- #### --text-- -Placeholder question +Which of the following is false? #### --distractors-- -Placeholder distractor 1 +A number greater than 100 as an argument to the `Number.prototype.toFixed()` method will result to a range error --- -Placeholder distractor 2 +`Number.prototype.toFixed(numDecimalPlaces)` is used to return a number converted to a string with decimals places depending on the argument --- -Placeholder distractor 3 +Calling the `Number.prototype.toFixed()` method on a number object with decimal points and no argument will round the number to the nearest ones #### --answer-- -Placeholder answer +Using `Number.prototype.toFixed()` without an argument will by default add a decimal point followed by a zero ### --question-- #### --text-- -Placeholder question +Which of the following is not a comparison operator? #### --distractors-- -Placeholder distractor 1 +`!=` --- -Placeholder distractor 2 +`>=` --- -Placeholder distractor 3 +`===` #### --answer-- -Placeholder answer +`!>` ### --question-- #### --text-- -Placeholder question +Which of the following is false? #### --distractors-- -Placeholder distractor 1 +Exponentiation has a lower operator precedence than the grouping operator `()`. --- -Placeholder distractor 2 +Postfix operators like `x++` or `x--` has higher precedence than prefix operators. --- -Placeholder distractor 3 +Relational operators like `>` or `<` has higher precedence than equality operators. #### --answer-- -Placeholder answer +Logical operator like `AND` and `OR` have higher precedence than bitwise operators. ### --question-- #### --text-- -Placeholder question +`Math.random()` returns a number in what range? #### --distractors-- -Placeholder distractor 1 +`Math.random()` returns a number between 0 (inclusive) and 1 (inclusive) --- -Placeholder distractor 2 +`Math.random()` returns a number between 0 (exclusive) and 1 (inclusive) --- -Placeholder distractor 3 +`Math.random()` returns a number between 0 (exclusive) and 1 (exclusive) #### --answer-- -Placeholder answer +`Math.random()`returns a number between 0 (inclusive) and 1 (exclusive) diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md b/curriculum/challenges/swahili/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md index 031787e635..c9b2883db2 100644 --- a/curriculum/challenges/swahili/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md @@ -286,4 +286,7 @@ p{ ```html

text


Projects

text


``` -`css` + +```css + +``` diff --git a/curriculum/challenges/swahili/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md b/curriculum/challenges/swahili/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md index a8b6821d41..8867ec39b4 100644 --- a/curriculum/challenges/swahili/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md +++ b/curriculum/challenges/swahili/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md @@ -17,439 +17,475 @@ Answer all of the questions below correctly to pass the quiz. #### --text-- -Placeholder question +What is the result of this code? + +``` js +const num1 = Number('888'); +const num2 = new Number('777'); + +console.log(num1 === 888); +console.log(num2 === 777); +``` #### --distractors-- -Placeholder distractor 1 +```js +true +true +``` --- -Placeholder distractor 2 +```js +false +false +``` --- -Placeholder distractor 3 +```js +false +true +``` #### --answer-- -Placeholder answer +```js +true +false +``` ### --question-- #### --text-- -Placeholder question +Which of the following is not an arithmetic operator in JavaScript? #### --distractors-- -Placeholder distractor 1 +`%` --- -Placeholder distractor 2 +`+` --- -Placeholder distractor 3 +`--` #### --answer-- -Placeholder answer +`==` ### --question-- #### --text-- -Placeholder question +Which of the following will log the correct gross profit? #### --distractors-- -Placeholder distractor 1 +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + store1_sales + store2_sales); +``` --- -Placeholder distractor 2 +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + store1_sales - store2_sales); +``` --- -Placeholder distractor 3 +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + (store1_sales - store2_sales)); +``` #### --answer-- -Placeholder answer +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + (store1_sales + store2_sales)); +``` ### --question-- #### --text-- -Placeholder question +What is the result of the statement `25 * 4 - 16 / (2 * 4) + 8`? #### --distractors-- -Placeholder distractor 1 +`18.5` --- -Placeholder distractor 2 +`107.5` --- -Placeholder distractor 3 +`17` #### --answer-- -Placeholder answer +`106` ### --question-- #### --text-- -Placeholder question +Which operator should you use when decrementing a variable in JavaScript? #### --distractors-- -Placeholder distractor 1 +`++` --- -Placeholder distractor 2 +`//` --- -Placeholder distractor 3 +`**` #### --answer-- -Placeholder answer +`--` ### --question-- #### --text-- -Placeholder question +Which of the following is not a bitwise operator? #### --distractors-- -Placeholder distractor 1 +`&` --- -Placeholder distractor 2 +`|` --- -Placeholder distractor 3 +`^` #### --answer-- -Placeholder answer +`>` ### --question-- #### --text-- -Placeholder question +Which of the following is the correct compound operator for getting the remainder? #### --distractors-- -Placeholder distractor 1 +`//=` --- -Placeholder distractor 2 +`\=` --- -Placeholder distractor 3 +`%%=` #### --answer-- -Placeholder answer +`%=` ### --question-- #### --text-- -Placeholder question +What is the difference between the `==` and `===` operators? #### --distractors-- -Placeholder distractor 1 +There is no difference. The comparison result will always have the same result. --- -Placeholder distractor 2 +The `==` operator is used to check if the data type is the same while the `===` is used to check if the value is equal. --- -Placeholder distractor 3 +The `==` operator can only be used with primitive types while the `===` operator is only used for objects. #### --answer-- -Placeholder answer +The `==` operator only compares values whereas the `===` operator compares values and types. ### --question-- #### --text-- -Placeholder question +Which of the following statements are false about unary plus (`+`) operators? #### --distractors-- -Placeholder distractor 1 +It tries to convert the operand into a number. --- -Placeholder distractor 2 +It is the fastest way to convert an operand to a number. --- -Placeholder distractor 3 +It can convert operands with negative numbers except for hexadecimals. #### --answer-- -Placeholder answer +It can't convert `true`, `false`, or `null` into a number. ### --question-- #### --text-- -Placeholder question +Which method in the built-in Math object is used to round up a number? #### --distractors-- -Placeholder distractor 1 +`Math.round(num)` --- -Placeholder distractor 2 +`Math.floor(num)` --- -Placeholder distractor 3 +`Math.fround(num)` #### --answer-- -Placeholder answer +`Math.ceil(num)` ### --question-- #### --text-- -Placeholder question +Which of the following Math object methods are used to raise a base to a power? #### --distractors-- -Placeholder distractor 1 +`Math.exp(base, power)` --- -Placeholder distractor 2 +`Math.raise(base, power)` --- -Placeholder distractor 3 +`Math.e(base, power)` #### --answer-- -Placeholder answer +`Math.pow(base, power)` ### --question-- #### --text-- -Placeholder question +Which of the following is the correct method for generating a random number in JavaScript? #### --distractors-- -Placeholder distractor 1 +`Math.rand(1,10)` --- -Placeholder distractor 2 +`Math.rand()` --- -Placeholder distractor 3 +`Math.random(1,10)` #### --answer-- -Placeholder answer +`Math.random()` ### --question-- #### --text-- -Placeholder question +Which of the following will return `false`? #### --distractors-- -Placeholder distractor 1 +`isNaN("1998", "1999")` --- -Placeholder distractor 2 +`isNaN({})` --- -Placeholder distractor 3 +`isNaN(undefined)` #### --answer-- -Placeholder answer +`isNaN(null)` ### --question-- #### --text-- -Placeholder question +Which of the following will convert `172` to its hexadecimal equivalent? #### --distractors-- -Placeholder distractor 1 +`(-0xa5).toString(2);` --- -Placeholder distractor 2 +`(172).string(0x);` --- -Placeholder distractor 3 +`(172).parseString(0x);` #### --answer-- -Placeholder answer +`(172).toString(16);` ### --question-- #### --text-- -Placeholder question +Which of the following is the right way to convert a string to an integer? #### --distractors-- -Placeholder distractor 1 +`parseINT("300")` --- -Placeholder distractor 2 +`int("300")` --- -Placeholder distractor 3 +`integer("300")` #### --answer-- -Placeholder answer +`parseInt("300")` ### --question-- #### --text-- -Placeholder question +Which of the following statements is false? #### --distractors-- -Placeholder distractor 1 +`parseFloat()` ignores trailing invalid characters --- -Placeholder distractor 2 +`parseFloat()` can parse a string that begins with `Infinity` or `-Infinity` --- -Placeholder distractor 3 +`parseFloat("0x1f")` will return `0` #### --answer-- -Placeholder answer +`parseFloat()` requires two parameters ### --question-- #### --text-- -Placeholder question +Which of the following is false? #### --distractors-- -Placeholder distractor 1 +A number greater than 100 as an argument to the `Number.prototype.toFixed()` method will result to a range error --- -Placeholder distractor 2 +`Number.prototype.toFixed(numDecimalPlaces)` is used to return a number converted to a string with decimals places depending on the argument --- -Placeholder distractor 3 +Calling the `Number.prototype.toFixed()` method on a number object with decimal points and no argument will round the number to the nearest ones #### --answer-- -Placeholder answer +Using `Number.prototype.toFixed()` without an argument will by default add a decimal point followed by a zero ### --question-- #### --text-- -Placeholder question +Which of the following is not a comparison operator? #### --distractors-- -Placeholder distractor 1 +`!=` --- -Placeholder distractor 2 +`>=` --- -Placeholder distractor 3 +`===` #### --answer-- -Placeholder answer +`!>` ### --question-- #### --text-- -Placeholder question +Which of the following is false? #### --distractors-- -Placeholder distractor 1 +Exponentiation has a lower operator precedence than the grouping operator `()`. --- -Placeholder distractor 2 +Postfix operators like `x++` or `x--` has higher precedence than prefix operators. --- -Placeholder distractor 3 +Relational operators like `>` or `<` has higher precedence than equality operators. #### --answer-- -Placeholder answer +Logical operator like `AND` and `OR` have higher precedence than bitwise operators. ### --question-- #### --text-- -Placeholder question +`Math.random()` returns a number in what range? #### --distractors-- -Placeholder distractor 1 +`Math.random()` returns a number between 0 (inclusive) and 1 (inclusive) --- -Placeholder distractor 2 +`Math.random()` returns a number between 0 (exclusive) and 1 (inclusive) --- -Placeholder distractor 3 +`Math.random()` returns a number between 0 (exclusive) and 1 (exclusive) #### --answer-- -Placeholder answer +`Math.random()`returns a number between 0 (inclusive) and 1 (exclusive) diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md index 98f44463bc..c777b5e04e 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md @@ -286,4 +286,7 @@ p{ ```html

text


Projects

text


``` -`css` + +```css + +``` diff --git a/curriculum/challenges/ukrainian/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md b/curriculum/challenges/ukrainian/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md index 29fdf54f82..d35af5014b 100644 --- a/curriculum/challenges/ukrainian/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md +++ b/curriculum/challenges/ukrainian/25-front-end-development/quiz-javascript-math/66edc3ab8c6413c344f401bf.md @@ -17,439 +17,475 @@ dashedName: quiz-javascript-math #### --text-- -Placeholder question +What is the result of this code? + +``` js +const num1 = Number('888'); +const num2 = new Number('777'); + +console.log(num1 === 888); +console.log(num2 === 777); +``` #### --distractors-- -Placeholder distractor 1 +```js +true +true +``` --- -Placeholder distractor 2 +```js +false +false +``` --- -Placeholder distractor 3 +```js +false +true +``` #### --answer-- -Placeholder answer +```js +true +false +``` ### --question-- #### --text-- -Placeholder question +Which of the following is not an arithmetic operator in JavaScript? #### --distractors-- -Placeholder distractor 1 +`%` --- -Placeholder distractor 2 +`+` --- -Placeholder distractor 3 +`--` #### --answer-- -Placeholder answer +`==` ### --question-- #### --text-- -Placeholder question +Which of the following will log the correct gross profit? #### --distractors-- -Placeholder distractor 1 +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + store1_sales + store2_sales); +``` --- -Placeholder distractor 2 +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + store1_sales - store2_sales); +``` --- -Placeholder distractor 3 +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + (store1_sales - store2_sales)); +``` #### --answer-- -Placeholder answer +``` js +let store1_sales = 7500; +let store2_sales = 6000; +console.log("Total Sales: " + (store1_sales + store2_sales)); +``` ### --question-- #### --text-- -Placeholder question +What is the result of the statement `25 * 4 - 16 / (2 * 4) + 8`? #### --distractors-- -Placeholder distractor 1 +`18.5` --- -Placeholder distractor 2 +`107.5` --- -Placeholder distractor 3 +`17` #### --answer-- -Placeholder answer +`106` ### --question-- #### --text-- -Placeholder question +Which operator should you use when decrementing a variable in JavaScript? #### --distractors-- -Placeholder distractor 1 +`++` --- -Placeholder distractor 2 +`//` --- -Placeholder distractor 3 +`**` #### --answer-- -Placeholder answer +`--` ### --question-- #### --text-- -Placeholder question +Which of the following is not a bitwise operator? #### --distractors-- -Placeholder distractor 1 +`&` --- -Placeholder distractor 2 +`|` --- -Placeholder distractor 3 +`^` #### --answer-- -Placeholder answer +`>` ### --question-- #### --text-- -Placeholder question +Which of the following is the correct compound operator for getting the remainder? #### --distractors-- -Placeholder distractor 1 +`//=` --- -Placeholder distractor 2 +`\=` --- -Placeholder distractor 3 +`%%=` #### --answer-- -Placeholder answer +`%=` ### --question-- #### --text-- -Placeholder question +What is the difference between the `==` and `===` operators? #### --distractors-- -Placeholder distractor 1 +There is no difference. The comparison result will always have the same result. --- -Placeholder distractor 2 +The `==` operator is used to check if the data type is the same while the `===` is used to check if the value is equal. --- -Placeholder distractor 3 +The `==` operator can only be used with primitive types while the `===` operator is only used for objects. #### --answer-- -Placeholder answer +The `==` operator only compares values whereas the `===` operator compares values and types. ### --question-- #### --text-- -Placeholder question +Which of the following statements are false about unary plus (`+`) operators? #### --distractors-- -Placeholder distractor 1 +It tries to convert the operand into a number. --- -Placeholder distractor 2 +It is the fastest way to convert an operand to a number. --- -Placeholder distractor 3 +It can convert operands with negative numbers except for hexadecimals. #### --answer-- -Placeholder answer +It can't convert `true`, `false`, or `null` into a number. ### --question-- #### --text-- -Placeholder question +Which method in the built-in Math object is used to round up a number? #### --distractors-- -Placeholder distractor 1 +`Math.round(num)` --- -Placeholder distractor 2 +`Math.floor(num)` --- -Placeholder distractor 3 +`Math.fround(num)` #### --answer-- -Placeholder answer +`Math.ceil(num)` ### --question-- #### --text-- -Placeholder question +Which of the following Math object methods are used to raise a base to a power? #### --distractors-- -Placeholder distractor 1 +`Math.exp(base, power)` --- -Placeholder distractor 2 +`Math.raise(base, power)` --- -Placeholder distractor 3 +`Math.e(base, power)` #### --answer-- -Placeholder answer +`Math.pow(base, power)` ### --question-- #### --text-- -Placeholder question +Which of the following is the correct method for generating a random number in JavaScript? #### --distractors-- -Placeholder distractor 1 +`Math.rand(1,10)` --- -Placeholder distractor 2 +`Math.rand()` --- -Placeholder distractor 3 +`Math.random(1,10)` #### --answer-- -Placeholder answer +`Math.random()` ### --question-- #### --text-- -Placeholder question +Which of the following will return `false`? #### --distractors-- -Placeholder distractor 1 +`isNaN("1998", "1999")` --- -Placeholder distractor 2 +`isNaN({})` --- -Placeholder distractor 3 +`isNaN(undefined)` #### --answer-- -Placeholder answer +`isNaN(null)` ### --question-- #### --text-- -Placeholder question +Which of the following will convert `172` to its hexadecimal equivalent? #### --distractors-- -Placeholder distractor 1 +`(-0xa5).toString(2);` --- -Placeholder distractor 2 +`(172).string(0x);` --- -Placeholder distractor 3 +`(172).parseString(0x);` #### --answer-- -Placeholder answer +`(172).toString(16);` ### --question-- #### --text-- -Placeholder question +Which of the following is the right way to convert a string to an integer? #### --distractors-- -Placeholder distractor 1 +`parseINT("300")` --- -Placeholder distractor 2 +`int("300")` --- -Placeholder distractor 3 +`integer("300")` #### --answer-- -Placeholder answer +`parseInt("300")` ### --question-- #### --text-- -Placeholder question +Which of the following statements is false? #### --distractors-- -Placeholder distractor 1 +`parseFloat()` ignores trailing invalid characters --- -Placeholder distractor 2 +`parseFloat()` can parse a string that begins with `Infinity` or `-Infinity` --- -Placeholder distractor 3 +`parseFloat("0x1f")` will return `0` #### --answer-- -Placeholder answer +`parseFloat()` requires two parameters ### --question-- #### --text-- -Placeholder question +Which of the following is false? #### --distractors-- -Placeholder distractor 1 +A number greater than 100 as an argument to the `Number.prototype.toFixed()` method will result to a range error --- -Placeholder distractor 2 +`Number.prototype.toFixed(numDecimalPlaces)` is used to return a number converted to a string with decimals places depending on the argument --- -Placeholder distractor 3 +Calling the `Number.prototype.toFixed()` method on a number object with decimal points and no argument will round the number to the nearest ones #### --answer-- -Placeholder answer +Using `Number.prototype.toFixed()` without an argument will by default add a decimal point followed by a zero ### --question-- #### --text-- -Placeholder question +Which of the following is not a comparison operator? #### --distractors-- -Placeholder distractor 1 +`!=` --- -Placeholder distractor 2 +`>=` --- -Placeholder distractor 3 +`===` #### --answer-- -Placeholder answer +`!>` ### --question-- #### --text-- -Placeholder question +Which of the following is false? #### --distractors-- -Placeholder distractor 1 +Exponentiation has a lower operator precedence than the grouping operator `()`. --- -Placeholder distractor 2 +Postfix operators like `x++` or `x--` has higher precedence than prefix operators. --- -Placeholder distractor 3 +Relational operators like `>` or `<` has higher precedence than equality operators. #### --answer-- -Placeholder answer +Logical operator like `AND` and `OR` have higher precedence than bitwise operators. ### --question-- #### --text-- -Placeholder question +`Math.random()` returns a number in what range? #### --distractors-- -Placeholder distractor 1 +`Math.random()` returns a number between 0 (inclusive) and 1 (inclusive) --- -Placeholder distractor 2 +`Math.random()` returns a number between 0 (exclusive) and 1 (inclusive) --- -Placeholder distractor 3 +`Math.random()` returns a number between 0 (exclusive) and 1 (exclusive) #### --answer-- -Placeholder answer +`Math.random()`returns a number between 0 (inclusive) and 1 (exclusive)