Question:
We need your help in translating the contributing documentations for Arabic, Chinese, Portuguese, Russian and Spanish. There are the individual issues that you can help on, if you speak any of these: [x] Arabic: [ ] Chinese: [ ] Portuguese: [ ] Russian: [ ] Spanish: Please reach out to us in or for any queries. Happy contributing. There is still work pending on this. When you make a PR for this particular issue, do not tag it with instead just reference it with
i want to help you to translate in spanish, but i cannot see the issue
Hi I have updated the post, thanks.
Hi! I want to help you translate the contributing documentations into Chinese.
you did a great job translating the Guide README to French . Maybe you could help us translate the Contributing Doc to French if you have some time?
Hey ! I'd love to help with translating the Contributing Doc to French, I'm going to start working on it.
I'd love to help with translating the FreeCodeCamp Curriculum in Italian and Romanian, Do you know when we can start working on it and when it will be open to work on?
Hi, and thanks a lot for taking the time to contribute to At the minute we are focused to have translations only in the 5 additional languages as you see on the contributing doc. This is primarily because of the operational logistics involved in maintaining the separate platforms. We want these languages to be ready and stable before going firth with other languages. We will definitely consider additional languages in future, however we do not have any timeline on these. We will make an announcement when that happens. Thanks.
Hi Mrugesh, Thank you for getting back to me. I didn't know all of this and I just sent 2 pull requests for Creating the Romanian and Italian translation for the Contribution Guidelines. Mostly I did it after I read Quincy's article "I just got my free Hacktoberfest shirt. Here’s a quick way you can get yours.". At this point, I don't know if I should continue up to 5 pull requests as it says in the article and you just put it on the side until you are ready to go with the Romanian and Italian versions or I should try other modifications for the pull requests.I'm new myself to all of this stuff and I'm trying to learn as fast as possible. Please let me know how you like me to proceed or what works best in your interest. Thank you. Linda Kovacs
Hi you should close those PRs. Do not worry, they will still count as valid contributions. And you should proceed with working on other areas. We apologise if this were not clarified in due time, and you had to spend your efforts on this. Thanks once again for all your contributions.
I just closed my PR and . Thank you for your help.
I can help with Arabic translation but I have a problem with Document Direction as Arabic is RTL Language. Is there a solution for this issue ?
I have some problems with my pull request for Created Italian translation for the freeCodeCamp README.MD file. Something went wrong. Could you please help me? Here is the link of the file on Github: Thank you.
I have some problems with my pull request for . Something went wrong. Could you please help me? Thank you.
I don't have any translation skills, but I fixed the links in the READMEs to go to the correct language documents that everyone is doing such an awesome job translating.
Thanks for working on the translations for the "Contributing to freeCodeCamp". Here on we are making contributing to translations for contribution docs ad hoc. You are free to make pull-requests for improving these translations. We are closing the issue as these do not need tracking per se. You can raise a fresh issue if you find something incorrect in the existing docs.

Haskell - стандартизированный, универсальный, чисто функциональный язык программирования с декларативной и сильной статической типизацией. <del> У Хаскелла есть глубокие корни в математике, и вы скоро научитесь ценить последствия этого. </del> <ins> Haskell глубоко уходит корнями в математику, скоро вы оцените его преимущества. </ins> <del> ## Версия </del> <ins> ## Версии </ins> <del> В настоящее время последняя версия GHC составляет 8,6 (по состоянию на 12 октября 2018 года) </del> <ins> В настоящее время последняя версия GHC - 8.6 (по состоянию на 12 октября 2018 года) </ins> <del> ## Монтаж </del> <ins> ## Установка </ins> <del> Рекомендуемый способ установки Haskell - использование stack: [stack download](https://docs.haskellstack.org/en/stable/README/#how-to-install) Stack - это кросс-платформенная программа для разработки проектов Haskell. Он нацелен на Haskellers как новых, так и опытных. </del> <ins> Рекомендуемый способ установки Haskell - использование stack: [stack download](https://docs.haskellstack.org/en/stable/README/#how-to-install) Stack - это кросс-платформенная утилита для разработки проектов на Haskell. Она нацелена как на опытных пользователей, так и на новичков. </ins> <del> Чтобы начать использовать Haskell, вам нужен GHC (компилятор Glasgow Haskell), поэтому для настройки: [настройка стека](https://docs.haskellstack.org/en/stable/README/#how-to-install://docs.haskellstack.org/en/stable/README/#quick-start-guide) </del> <ins> Чтобы начать использовать Haskell нужен GHC (Glasgow Haskell Compiler), поэтому для установки можно воспользоваться [этой ссылкой](https://docs.haskellstack.org/en/stable/README/#how-to-install://docs.haskellstack.org/en/stable/README/#quick-start-guide), или просто набрав в консоли: </ins> ```shell stack new my-project

stack exec my-project-exe ``` <del> Слово осторожное, постарайтесь не использовать установку стека даже если он будет устанавливать пакет по всему миру, это не рекомендуется, так как разные версии пакетов совместимы с различными версиями GHC. Следовательно, использование локальной копии пакета с использованием сборки стека - лучший способ следовать. </del> <ins> ## Внимание Постарайтесь не использовать `stack install`, т.к. эта команда будет устанавливать пакет глобально, что не рекомендуется, так как разные версии пакетов могут быть не совместимы с разными версиями GHC. Поэтому лучшим вариантов является локальная установка с использованием `stack`. </ins> <del> ## Привет мир </del> <ins> ## Hellow, world! </ins> ```haskell main :: IO () main = print "Hello Haskell :)" ``` <del> Сохраните код выше в файле с именем «hello.hs» и сохраните. </del> <ins> Сохраните код в файле с названием «hello.hs». </ins> <del> Чтобы скомпилировать пример Hello World, это преобразует наш код haskell в машинные понятные байт-коды. </del> <ins> Чтобы скомпилировать его и запустить, наберите </ins> ```shell stack ghc hello.hs

## Документация <del> Hackage предоставляет документацию для Haskell </del> <ins> [Haskell.org](https://www.haskell.org/documentation) - книги, курсы по Haskell [Hackage](https://hackage.haskell.org) - пакетный менеджер для Haskell </ins> ## Хотите узнать больше? <del> *   [Ссылка на](https://wiki.haskell.org/Haskell) Haskell wiki </del>  No newline at end of file <ins> *   [wiki](https://wiki.haskell.org/Haskell) Haskell wiki </ins>


Question: <!-- NOTE: If you're reporting a security issue, don't create a GitHub issue. Instead, email We will look into it immediately. --Describe your problem and how to reproduce it: There's a spelling mistake on the Spanish documentation's ReadMe Add a Link to the page with the problem: Tell us about your browser and operating system: Browser Name: Chrome Browser Version: 69.0.3497.100 Operating System: MacOS If possible, add a screenshot here (you can drag and drop, png, jpg, gif, etc. in this box): !

1. Guía de estilo sobre cómo crear Guías. 2. Guía de estilo sobre cómo crear Desafíos de programación. <del> ## Referencía rápida de comandos para trabajar en local </del> <ins> ## Referencia rápida de comandos para trabajar en local </ins> Una referencia rápida de los comandos que necesitarás cuando trabajes en local.


Question:
Describe your problem and how to reproduce it: A PHP syntax overview article is outside of the PHP heading. Add a Link to the page with the problem: Tell us about your browser and operating system: Browser Name: Google Chrome Browser Version: 69.0.3497.100 Operating System: Mac OS High Sierra 10.13.6 If possible, add a screenshot here (you can drag and drop, png, jpg, gif, etc. in this box): <img width="1248" alt="screen shot 2018-10-12 at 09 14 03" src="https://user-"
Can I take this one? This would be my first ever pull request to a real issue. To fix it I would drag the "PHP Syntax Overview" folder into the "PHP" folder here:

<del> --- title: PHP Syntax Overview --- This chapter will give you an idea of very basic syntax of PHP and very important to make your PHP foundation strong. ### Escaping to PHP The PHP parsing engine needs a way to differentiate PHP code from other elements in the page. The mechanism for doing so is known as 'escaping to PHP'. There are four ways to do this − #### Canonical PHP tags The most universally effective PHP tag style is − ``` <?php...?> ``` If you use this style, you can be positive that your tags will always be correctly interpreted. #### Short-open (SGML-style) tags Short or short-open tags look like this − ``` <?...?> ``` Short tags are, as one might expect, the shortest option You must do one of two things to enable PHP to recognize the tags − Choose the --enable-short-tags configuration option when you're building PHP. Set the short_open_tag setting in your php.ini file to on. This option must be disabled to parse XML with PHP because the same syntax is used for XML tags. #### ASP-style tags ASP-style tags mimic the tags used by Active Server Pages to delineate code blocks. ASP-style tags look like this − ``` <%...%> ``` To use ASP-style tags, you will need to set the configuration option in your php.ini file. #### HTML script tags HTML script tags look like this − ``` <script language="PHP">...</script> ``` ### Commenting PHP Code A comment is the portion of a program that exists only for the human reader and stripped out before displaying the programs result. There are two commenting formats in PHP − #### Single-line comments − They are generally used for short explanations or notes relevant to the local code. Here are the examples of single line comments. ``` <? # This is a comment, and # This is the second line of the comment // This is a comment too. Each style comments only print "An example with single line comments"; ?> ``` #### Multi-lines printing − Here are the examples to print multiple lines in a single print statement − ``` <? # First Example print <<<END This uses the "here document" syntax to output multiple lines with $variable interpolation. Note that the here document terminator must appear on a line with just a semicolon no extra whitespace! END; # Second Example print "This spans multiple lines. The newlines will be output as well"; ?> ``` #### Multi-lines comments − They are generally used to provide pseudocode algorithms and more detailed explanations when necessary. The multiline style of commenting is the same as in C. Here are the example of multi lines comments. ``` <? /* This is a comment with multiline Author : Mohammad Mohtashim Purpose: Multiline Comments Demo Subject: PHP */ print "An example with multi line comments"; ?> ``` ### PHP is whitespace insensitive Whitespace is the stuff you type that is typically invisible on the screen, including spaces, tabs, and carriage returns (end-of-line characters). PHP whitespace insensitive means that it almost never matters how many whitespace characters you have in a row.one whitespace character is the same as many such characters. For example, each of the following PHP statements that assigns the sum of 2 + 2 to the variable $four is equivalent − ``` $four = 2 + 2; // single spaces $four <tab>=<tab2<tab>+<tab>2 ; // spaces and tabs $four = 2+ 2; // multiple lines ``` ### PHP is case sensitive Yeah it is true that PHP is a case sensitive language. Try out following example − ``` <html> <body> <?php $capital = 67; print("Variable capital is $capital<br>"); print("Variable CaPiTaL is $CaPiTaL<br>"); ?> </body> </html> ``` This will produce the following result − ``` Variable capital is 67 Variable CaPiTaL is ``` ### Statements are expressions terminated by semicolons A statement in PHP is any expression that is followed by a semicolon (;).Any sequence of valid PHP statements that is enclosed by the PHP tags is a valid PHP program. Here is a typical statement in PHP, which in this case assigns a string of characters to a variable called $greeting − ``` $greeting = "Welcome to PHP!"; ``` ### Expressions are combinations of tokens The smallest building blocks of PHP are the indivisible tokens, such as numbers (3.14159), strings (.two.), variables ($two), constants (TRUE), and the special words that make up the syntax of PHP itself like if, else, while, for and so forth ### Braces make blocks Although statements cannot be combined like expressions, you can always put a sequence of statements anywhere a statement can go by enclosing them in a set of curly braces. Here both statements are equivalent − ``` if (3 == 2 + 1) print("Good - I haven't totally lost my mind.<br>"); if (3 == 2 + 1) { print("Good - I haven't totally"); print("lost my mind.<br>"); } ``` ### Running PHP Script from Command Prompt Yes you can run your PHP script on your command prompt. Assuming you have following content in test.php file ``` <?php echo "Hello PHP!!!!!"; ?> ``` Now run this script as command prompt as follows − ``` $ php test.php ``` It will produce the following result − ``` Hello PHP!!!!! ``` Hope now you have basic knowledge of PHP Syntax. </del>

<ins> --- title: PHP Syntax Overview --- This chapter will give you an idea of very basic syntax of PHP and very important to make your PHP foundation strong. ### Escaping to PHP The PHP parsing engine needs a way to differentiate PHP code from other elements in the page. The mechanism for doing so is known as 'escaping to PHP'. There are four ways to do this − #### Canonical PHP tags The most universally effective PHP tag style is − ``` <?php...?> ``` If you use this style, you can be positive that your tags will always be correctly interpreted. #### Short-open (SGML-style) tags Short or short-open tags look like this − ``` <?...?> ``` Short tags are, as one might expect, the shortest option You must do one of two things to enable PHP to recognize the tags − Choose the --enable-short-tags configuration option when you're building PHP. Set the short_open_tag setting in your php.ini file to on. This option must be disabled to parse XML with PHP because the same syntax is used for XML tags. #### ASP-style tags ASP-style tags mimic the tags used by Active Server Pages to delineate code blocks. ASP-style tags look like this − ``` <%...%> ``` To use ASP-style tags, you will need to set the configuration option in your php.ini file. #### HTML script tags HTML script tags look like this − ``` <script language="PHP">...</script> ``` ### Commenting PHP Code A comment is the portion of a program that exists only for the human reader and stripped out before displaying the programs result. There are two commenting formats in PHP − #### Single-line comments − They are generally used for short explanations or notes relevant to the local code. Here are the examples of single line comments. ``` <? # This is a comment, and # This is the second line of the comment // This is a comment too. Each style comments only print "An example with single line comments"; ?> ``` #### Multi-lines printing − Here are the examples to print multiple lines in a single print statement − ``` <? # First Example print <<<END This uses the "here document" syntax to output multiple lines with $variable interpolation. Note that the here document terminator must appear on a line with just a semicolon no extra whitespace! END; # Second Example print "This spans multiple lines. The newlines will be output as well"; ?> ``` #### Multi-lines comments − They are generally used to provide pseudocode algorithms and more detailed explanations when necessary. The multiline style of commenting is the same as in C. Here are the example of multi lines comments. ``` <? /* This is a comment with multiline Author : Mohammad Mohtashim Purpose: Multiline Comments Demo Subject: PHP */ print "An example with multi line comments"; ?> ``` ### PHP is whitespace insensitive Whitespace is the stuff you type that is typically invisible on the screen, including spaces, tabs, and carriage returns (end-of-line characters). PHP whitespace insensitive means that it almost never matters how many whitespace characters you have in a row.one whitespace character is the same as many such characters. For example, each of the following PHP statements that assigns the sum of 2 + 2 to the variable $four is equivalent − ``` $four = 2 + 2; // single spaces $four <tab>=<tab2<tab>+<tab>2 ; // spaces and tabs $four = 2+ 2; // multiple lines ``` ### PHP is case sensitive Yeah it is true that PHP is a case sensitive language. Try out following example − ``` <html> <body> <?php $capital = 67; print("Variable capital is $capital<br>"); print("Variable CaPiTaL is $CaPiTaL<br>"); ?> </body> </html> ``` This will produce the following result − ``` Variable capital is 67 Variable CaPiTaL is ``` ### Statements are expressions terminated by semicolons A statement in PHP is any expression that is followed by a semicolon (;).Any sequence of valid PHP statements that is enclosed by the PHP tags is a valid PHP program. Here is a typical statement in PHP, which in this case assigns a string of characters to a variable called $greeting − ``` $greeting = "Welcome to PHP!"; ``` ### Expressions are combinations of tokens The smallest building blocks of PHP are the indivisible tokens, such as numbers (3.14159), strings (.two.), variables ($two), constants (TRUE), and the special words that make up the syntax of PHP itself like if, else, while, for and so forth ### Braces make blocks Although statements cannot be combined like expressions, you can always put a sequence of statements anywhere a statement can go by enclosing them in a set of curly braces. Here both statements are equivalent − ``` if (3 == 2 + 1) print("Good - I haven't totally lost my mind.<br>"); if (3 == 2 + 1) { print("Good - I haven't totally"); print("lost my mind.<br>"); } ``` ### Running PHP Script from Command Prompt Yes you can run your PHP script on your command prompt. Assuming you have following content in test.php file ``` <?php echo "Hello PHP!!!!!"; ?> ``` Now run this script as command prompt as follows − ``` $ php test.php ``` It will produce the following result − ``` Hello PHP!!!!! ``` Hope now you have basic knowledge of PHP Syntax. </ins>


Question:
Looking forward for reporting a security issue: Please report security issues by sending an email to instead of raising a Github issue. Describe the bug A clear and concise description of what the bug is. The Monaco editor contains features for accessibility, specifically a mode for screen reader users which helps in navigating and using the editor effectively. This feature, as of now, must be enabled at the start of each lesson, even after enabling it once at the beginning of the session. To Reproduce Steps to reproduce the behavior: to any lesson in the curriculum. the code editor, set focus to it. alt+f1 to show accessibility help for the editor, and choose to enable the screen reader mode the lesson, advance to the next, and repeat steps two and three Expected behavior A clear and concise description of what you expected to happen. The screen reader mode should have stayed enabled across lessons. Screenshots If applicable, add screenshots to help explain your problem. Desktop (please complete the following information): OS: [e.g. iOS] Windows Browser [e.g. chrome, safari] Chrome Version [e.g. 22] 69.0.3497.100 (Official Build) (64-bit) Smartphone (please complete the following information): Device: [e.g. iPhone6] OS: [e.g. iOS8.1] Browser [e.g. stock browser, safari] Version [e.g. 22] Additional context Add any other context about the problem here. Tested screen reader: NVDA version 2018.3.2 from
Hey, As a part of hacktoberfest, I would like to work on this issue. Can I expect mentorship on this?
I'm new on this too. But if you need help, I would like to work on this issue too.
Can you reproduce this issue?
A group of us are working on this issue for a class project in university. We aim to address this in the next couple of days. We will try and at least present the community with a first iteration of our proposed solution. Just a heads up. If the current developers have any advice or tips, feel free to contact me. Thank you. is the primary developer in the team, working alongside me.
Any updates on this ?
This looks to be fixed, the editor is focused on load. Can you confirm that this is fixed If so, this can probably be closed.
I don't think it is fixed. It focuses on load by default, but I think that turning on the screen reader mode is separate from just focusing. I don't have a screen reader installed, but if I follow the steps above I keep having to re-enable that mode each time I go to a new challenge.
Sorry, I don’t think the editor should be focused on load, as that means the screen reader user most unfocus it, move back to the heading to read the challenge, then focus it again to write code. Also, I still have to enable accessibility mode on each challenge.
I see now. And I can say that the built in screen reader on osx doesn't do anything with the editor. Is this something we can control? Or is it just part of the monaco editor and we are at their mercy?
VoiceOver on MacOS is… not the best, sadly, when it comes to web apps. If possible, you can send technical info about this to <mailto: is Microsoft’s editor, which seems to be VSCode stripped down to the editor. Perhaps you could contact Microsoft and see if they could add a way to make accessibility states persistent across loads, if this isn’t possible already.
That is annoying. For now you should be able to focus the description by pressing escape (at the moment, it's still in a state of flux), but I'll see about making screen-reader mode something that persists between challenges.
Seeing as how this issue is beyond our control, should we close this and make a new issue about the editor being focused on load? You can feel free to email apple or microsoft if you want Thanks for the advice though.
no need to close this. I think I can fix it.
Yes, we can close this issue.
Quick update. Both the auto-focusing and the persistence of accessibility mode should be fixable. I think I'm about 90% of the way there, but for some reason it stops letting you toggle the accessibility support after a couple of toggles. This, obviously, isn't ideal, but most of the functionality is there.

import { canFocusEditorSelector, executeChallenge, <ins> inAccessibilityModeSelector, </ins> setEditorFocusability, <ins> setAccessibilityMode, </ins> updateFile } from '../redux'; import { userSelector, isDonationModalOpenSelector } from '../../../redux';

executeChallenge: PropTypes.func.isRequired, ext: PropTypes.string, fileKey: PropTypes.string, <ins> inAccessibilityMode: PropTypes.bool.isRequired, setAccessibilityMode: PropTypes.func.isRequired, </ins> setEditorFocusability: PropTypes.func, theme: PropTypes.string, updateFile: PropTypes.func.isRequired

const mapStateToProps = createSelector( canFocusEditorSelector, <ins> inAccessibilityModeSelector, </ins> isDonationModalOpenSelector, userSelector, <del> (canFocus, open, { theme = 'default' }) => ({ </del> <ins> (canFocus, accessibilityMode, open, { theme = 'default' }) => ({ </ins> canFocus: open ? false : canFocus, <ins> inAccessibilityMode: accessibilityMode, </ins> theme }) ); const mapDispatchToProps = { setEditorFocusability, <ins> setAccessibilityMode, </ins> executeChallenge, updateFile };

editorDidMount = (editor, monaco) => { this._editor = editor; <del> if (this.props.canFocus) { </del> <ins> this._editor.updateOptions({ accessibilitySupport: this.props.inAccessibilityMode ? 'on' : 'auto' }); // Users who are using screen readers should not have to move focus from // the editor to the description every time they open a challenge. if (this.props.canFocus && !this.props.inAccessibilityMode) { </ins> this._editor.focus(); } else this.focusOnHotkeys(); this._editor.addAction({

this.props.setEditorFocusability(false); } }); <ins> this._editor.addAction({ id: 'toggle-accessibility', label: 'Toggle Accessibility Mode', keybindings: [monaco.KeyMod.CtrlCmd | monaco.KeyCode.F1], run: () => { const currentAccessibility = this.props.inAccessibilityMode; // The store needs to be updated first, as onDidChangeConfiguration is // called before updateOptions returns this.props.setAccessibilityMode(!currentAccessibility); this._editor.updateOptions({ accessibilitySupport: currentAccessibility ? 'auto' : 'on' }); } }); </ins> this._editor.onDidFocusEditorWidget(() => this.props.setEditorFocusability(true) ); <ins> // This is to persist changes caused by the accessibility tooltip. // Unfortunately it relies on Monaco's implementation details this._editor.onDidChangeConfiguration(() => { if ( this._editor.getConfiguration().accessibilitySupport === 2 && !this.props.inAccessibilityMode ) { this.props.setAccessibilityMode(true); } }); </ins> }; focusOnHotkeys() {

}, challengeTests: [], consoleOut: '', <ins> inAccessibilityMode: false, </ins> isCodeLocked: false, isBuildEnabled: true, modal: {

'moveToTab', <del> 'setEditorFocusability' </del> <ins> 'setEditorFocusability', 'setAccessibilityMode' </ins> ], ns );

export const moveToTab = createAction(types.moveToTab); export const setEditorFocusability = createAction(types.setEditorFocusability); <ins> export const setAccessibilityMode = createAction(types.setAccessibilityMode); </ins> export const currentTabSelector = state => state[ns].currentTab; export const challengeFilesSelector = state => state[ns].challengeFiles;

}; export const canFocusEditorSelector = state => state[ns].canFocusEditor; <ins> export const inAccessibilityModeSelector = state => state[ns].inAccessibilityMode; </ins> const MAX_LOGS_SIZE = 64 * 1024;

[types.setEditorFocusability]: (state, { payload }) => ({ ...state, canFocusEditor: payload <ins> }), [types.setAccessibilityMode]: (state, { payload }) => ({ ...state, inAccessibilityMode: payload </ins> }) }, initialState


Question:
Describe your problem and how to reproduce it: The test "Call functionWithArgs with two numbers after you define it." doesn't passes if the function call doesn't end with semi column. As in js semi columns are not required it should pass even if user doesn't add semi column Add a Link to the page with the problem: Tell us about your browser and operating system: Browser Name: Chrome Browser Version: latest Operating System: windows 10 If possible, add a screenshot here (you can drag and drop, png, jpg, gif, etc. in this box): ! !
There has been an on and off discussion for a while about whether to enforce the use of end-of-line statement semi-colons. W FYI - This debate about semi-colons is not new to FCC. This is a debate that has been going on for a long time. See the following link how not using semi-colons could cause unexpected errors. This debate is similar to whether or not you should require { and } if there is only one statement in the code block. For example: is the same as: but FCC's current linter settings expect the { and } to be used. Both are valid JavaScript, but it is thought using { and } makes it clear especially when you have a line after like below: OR Both of the above accomplish the same thing, but reading the code could get confusing especially if indentation of the second line was accidentally written as: Someone coming from Python might thing the second line is far of the if statement block when it is not. As far as the semi-colon debate goes, I don't care which way it is done, just as long as it is consistent throughout the curriculum. Currently, there are challenges which do not require the semi-colon and some which do (which you have observed).
Well as these tutorials requires user to type regular JavaScript code. It would make sense to treat the code same as regular javascripts treats it's. If the function returns correct result. Code should pass the test.
Are you referring to semi-colons or the curly brackets now?
I have eleborate my answer. And I am taking about semicolons.
I have asked those in charge to make a final decision about this issue. Once I get some feedback, I will let you know the verdict. This decision will affect many challenges.
Hi, By any chance have they took a decision about this issue? I can confirm that this is still an issue after 3 months. When you get used to code using the standardJS style(), for example, it's not immediately obvious that the "Call function" test is not passing due to a missing semicolon. I don't mind whether you decide to keep the semicolons or let them be optional, as it comes to coding style. But a failing test should indicate the real problem, and I feel that failing a test named "Call function after you define it" when you actually called your function properly, can be confusing to new developers. Cheers, Mike
Yes, would you be interested in making the semi-colon optional for this challenge to pass the tests?
sure! Just let me get familiar with the code base and as soon as I have a better grasp, I will send the pr's for this challenge and the next one (that is under the same situation).
Any progress on this I agree that the semi-colons should be optional - If a camper is failing a challenge with valid javascript, that seems like a problem that might confuse them.

- text: functionWithArgs(7,9) should output 16 testString: if(typeof functionWithArgs === "function") { capture(); functionWithArgs(7,9); uncapture(); } assert(logOutput == 16); - text: Call functionWithArgs with two numbers after you define it.  testString: assert(/^s*functionWithArgss*(s*d+s*,s*d+s*)s*;/m.test(code));   testString: assert(/^s*functionWithArgss*(s*d+s*,s*d+s*)s*/m.test(code));  ```


Question:
<!-- NOTE: If you're reporting a security issue, don't create a GitHub issue. Instead, email We will look into it immediately. --Add a Link to the page with the problem: If possible, add a screenshot here (you can drag and drop, png, jpg, gif, etc. in this box): !
I'm taking this

--- title: Cooling Systems --- <del> Your computer contains many parts that generate heat. Heat can cause premature failure and erratic behaviors. The more you overclock the graphics or the CPU, the hotter the computer will run. Cooling systems assure that your computer is stable and you extend the life of your investment. </del> <ins> Your computer contains many parts that generate heat. Heat can cause premature failure and erratic behaviors. The more you overclock the graphics or the CPU, the hotter the computer will run. Cooling systems assure that your computer is stable and help you extend the life of your investment. </ins> ## Case Cooling <del> Case cooling can be a combination of a well ventilated case and the use of fans to circulate air within the case. Most cases come with at least one fan. This is the minimum configuration. For best results, there be at least two fans in the case. One is as an intake to draw in cold air while the other is an exhaust to expel hot air. There are many different types of fans and configurations. Cable management also plays a huge part in cooling the system. Bad cable management and tangled wires disrupt airflow and cause dust to accumulate inside the case. </del> <ins> Case cooling can be a combination of a well ventilated case and the use of fans to circulate air within the case. Most cases come with at least one fan. This is the minimum configuration. For best results, there should be at least two fans in the case. One should be used as an intake to draw in cold air while the other should be an exhaust to expel hot air. There are many different types of fans and configurations. Cable management also plays a huge part in cooling the system. Bad cable management and tangled wires disrupt airflow and cause dust to accumulate inside the case. </ins> ## Components Cooling Cooling devices are available for individual parts on the computer. The two most common are coolers for CPU's and graphics cards. There are generally two types of component cooling systems, active and passive. <del> * Passive Systems - Usually consist of a heat sink or a heat conductive metal attached to the component. Passive cooling works by providing a larger surface to adsorb and dissipate the heat. </del> <ins> * Passive Systems - Usually consist of a heat sink or a heat conductive metal attached to the component. Passive cooling works by providing a larger surface to absorb and dissipate the heat. </ins> * Active Systems - Add a fan to the heat sink and you are actively removing heat. The cooling fan can be dynamically adjusted to the load of the CPU or graphics card on most motherboards. * Liquid Cooling - High performance computers can benefit from a liquid cooled system. These types of systems circulate a liquid between the hot components and a cooling radiator.

* Case Covers - Contrary to what you read on the internet, keeping the case covers on the computer aids cooling. Absence of the case covers disrupts air flow and can actually increase the heat inside the case. Room ventilation - Locate the computer where it is neutral to the rooms environmental registers. Keep the computer away from room heaters or vents at all times. * Room placement - Locate the computer away from windows or areas of strong sunlight exposure. Placement in closets can also provide challenges to cooling. <del> * Placement next to other computers - Locating the computer away from other equipment allows air to flow in and out of the computer. Placement close to other equipment can constrict air flow and increase heat. </del> <ins> * Placement next to walls and other computers - Locating the computer away from other equipment allows cool, clean, air to flow in and out of the computer. Placement close to other equipment can constrict air flow and increase heat. Placement next to a wall may also lead to the exhaust ports being completely blocked off and consequently increase heat. </ins> [Wikipedia - Article on computer cooling](https://en.wikipedia.org/wiki/Computer_cooling)


Question:
<!-- NOTE: If you're reporting a security issue, don't create a GitHub issue. Instead, email We will look into it immediately. --Describe your problem and how to reproduce it: The directory below is meant to say 'create-file-with-specific-size'. Specific is misspelled as 'sepcific'. Add a Link to the page with the problem: Tell us about your browser and operating system: Browser Name: Browser Version: Operating System: If possible, add a screenshot here (you can drag and drop, png, jpg, gif, etc. in this box):
i am taking this issue

<del> --- title: Create a dummy file with a specific size --- ## How to create dummy files with a specific size using the "dd" command: The "dd" command can be used to create a file of a specific size. This is useful if you would like to test download speeds, or any other tests, and need a file of a specific size. ``` dd if=/dev/zero of=file_name.txt bs=1024k count=10 ``` This will create a file of 1MB called file_name.txt. bs is your byte size and count represent the number of blocks. An easy way to look at is 1024K X 10. Here is an even simpler way to create a 1MB file: ``` dd if=/dev/zero of=file_name.txt bs=1MB count=1 ``` </del>

<ins> --- title: Create a dummy file with a specific size --- ## How to create dummy files with a specific size using the "dd" command: The "dd" command can be used to create a file of a specific size. This is useful if you would like to test download speeds, or any other tests, and need a file of a specific size. ``` dd if=/dev/zero of=file_name.txt bs=1024k count=10 ``` This will create a file of 1MB called file_name.txt. bs is your byte size and count represent the number of blocks. An easy way to look at is 1024K X 10. Here is an even simpler way to create a 1MB file: ``` dd if=/dev/zero of=file_name.txt bs=1MB count=1 ``` </ins>


Question: <!-- NOTE: If you're reporting a security issue, don't create a GitHub issue. Instead, email We will look into it immediately. -- Describe your problem and how to reproduce it: I noticed that the /guide/english/cplusplus has 2 seperate sections on 'inline functions' with much in common inbetween them. Add a Link to the page with the problem: Tell us about your browser and operating system: Browser Name: Google Chrome Browser Version: Version 69.0.3497.100 (Official Build) (64-bit) Operating System: Ubuntu 18.04.1 LTS If possible, add a screenshot here (you can drag and drop, png, jpg, gif, etc. in this box): !

<del> --- title: Inline Function --- # Inline Function ## Introduction Inline function is a special function defined in C++ and is expanded inline when it is called. Now, what does that exactly mean? Whenever a function is called it takes a lot of extra time for performing series of activities such as jumping to the function, saving registers, pushing arguments into stack and returning to the calling function. So it takes a lot of time. But an inline function is a function in which the compiler has been requested to perform inline expansion. Where the function requests the compiler to insert the complete body of the function in every place that the function is called, rather than generating code to call the function in the one place it is defined. However, we cannot guarantee that every function declared inline will be inline. Because when we declare a function as `inline`, it is a request, not a command. Compiler may ignore the request of inlining in the following situations:- 1) If the function contains loop e.g `for` loop, `while` loop, `do-while` loop etc. 2) If the function contains a `switch` or `goto` statement. 3) If the function doesn't return anything even if return type (other than `void` of course) is mentioned. 4) If the function contains a static variable. 5) If the function contains a recursive call. ``` c++ syntax :- --------- inline return_type function_name(argument_list){ // function body } ``` ## When to use Inline function * When the function performs small tasks and is called very often. * When performance is important. * Instead of a macro. ``` c++ #include<iostream> using namespace std; class MathOperation{ public: inline int add(int x, int y){ return(x+y); } inline float div(int n1, float n2){ return(n1/n2); } }; int main(){ MathOperation obj; cout << "Addition is :" << obj.add(34,12) << <"n"; cout << "Division is :" << obj.div(12,3.4) << "n"; return 0; } ``` ## Advantages of Inline function * It saves the overhead of return call from a function. * It increases locality of reference by utilizing instruction cache. * It speeds up your program by avoiding function call overheads. * It saves overhead of variables push/pop operations on the stack, when function calls happen. * It is possible to put a function definition in a header file, i.e. it can be included in multiple compilation unit, without the linker complaining. ## Disadvantages of inline function * When used in a header, it makes your header file larger with information which users don’t care. * It increases the executable size due to code expansion. * C++ inlining is resolved at compile time. Which means if you change the code of the inlined function, you would need to recompile all the code using it to make sure it will be updated. * As mentioned above it increases the executable size, which may cause thrashing in memory. More number of page fault, bringing down your program performance. </del>

## Inline Functions in C++ <del> When the program executes the function call instruction the CPU stores the memory address of the instruction following the function call, copies the arguments of the function on the stack and finally transfers control to the specified function. The CPU then executes the function code, stores the function return value in a predefined memory location/register and returns control to the calling function. This can become overhead if the execution time of function is less than the switching time from the caller function to called function (callee). For functions that are large and/or perform complex tasks, the overhead of the function call is usually insignificant compared to the amount of time the function takes to run. However, for small, commonly-used functions, the time needed to make the function call is often a lot more than the time needed to actually execute the function’s code. This overhead occurs for small functions because execution time of small function is less than the switching time. </del> <ins> When the program executes the function call instruction, the CPU stores the memory address of the instruction following the function call, copies the arguments of the function on the stack, and finally transfers control to the specified function. The CPU then executes the function code, stores the function return value in a predefined memory location/register and returns control to the calling function. This can become overhead if the execution time of function is less than the switching time from the caller function to called function (callee). For functions that are large and/or perform complex tasks, the overhead of the function call is usually insignificant compared to the amount of time the function takes to run. However, for small, commonly-used functions, the time needed to make the function call is often more than the time needed to actually execute the function’s code. This overhead occurs for small functions because execution time of small function is less than the switching time. C++ provides an inline functions to reduce the function call overhead for small functions. An inline function substitutes the code of the function where the call is being made (inline) instead of passing to the function. This substitution is performed by the C++ compiler at compile time. </ins> <del> C++ provides an inline functions to reduce the function call overhead. Inline function is a function that is expanded in line when it is called. When the inline function is called whole code of the inline function gets inserted or substituted at the point of inline function call. This substitution is performed by the C++ compiler at compile time. Inline function may increase efficiency if it is small. </del> The syntax for defining the function inline is: ```cpp inline return-type function-name(parameters) { // function code } ``` <del> Remember, inlining is only a request to the compiler, not a command. Compiler can ignore the request for inlining. Compiler may not perform inlining in such circumstances like: * If a function contains a loop. (for, while, do-while) </del> <ins> Note that inlining is only a request to the compiler, not a command. The compiler can ignore the request for inlining. The compiler may not perform inlining in the following circumstances: * If a function contains a loop (for, while, do-while). </ins> * If a function contains static variables. * If a function is recursive. * If a function return type is other than void, and the return statement doesn’t exist in function body. * If a function contains switch or goto statement. <del> ### Inline functions provide following advantages: </del> <ins> ### When to use inline functions: * When the function performs small tasks and is called very often. * When performance is important. * Instead of a macro. </ins> <del> * Function call overhead doesn’t occur. * It also saves the overhead of push/pop variables on the stack when function is called. * It also saves overhead of a return call from a function. * When you inline a function, you may enable compiler to perform context specific optimization on the body of function. Such optimizations are not possible for normal function calls. Other optimizations can be obtained by considering the flows of calling context and the called context. * Inline function may be useful (if it is small) for embedded systems because inline can yield less code than the function call preamble and return. </del> <ins> ``` c++ #include<iostream> </ins> <del> ### Inline function disadvantages: </del> <ins> using namespace std; </ins> <del> * The added variables from the inlined function consumes additional registers, After in-lining function if variables number which are going to use register increases than they may create overhead on register variable resource utilization. This means that when inline function body is substituted at the point of function call, total number of variables used by the function also gets inserted. So the number of register going to be used for the variables will also get increased. So if after function inlining variable numbers increase drastically then it would surely cause an overhead on register utilization. </del> <ins> class MathOperation{ </ins> <del> * If you use too many inline functions then the size of the binary executable file will be large, because of the duplication of same code. </del> <ins> public: inline int add(int x, int y){ return(x+y); } inline float div(int n1, float n2){ return(n1/n2); } }; </ins> <del> * Too much inlining can also reduce your instruction cache hit rate, thus reducing the speed of instruction fetch from that of cache memory to that of primary memory. </del> <ins> int main(){ </ins> <del> * Inline function may increase compile time overhead if someone changes the code inside the inline function then all the calling location has to be recompiled because compiler would require to replace all the code once again to reflect the changes, otherwise it will continue with old functionality. </del> <ins> MathOperation obj; cout << "Addition is :" << obj.add(34,12) << <"n"; cout << "Division is :" << obj.div(12,3.4) << "n"; return 0; } ``` ### Advantages: </ins> <del> * Inline functions may not be useful for many embedded systems. Because in embedded systems code size is more important than speed. </del> <ins> * It saves the overhead of return call from a function. * It increases locality of reference by utilizing instruction cache. * It speeds up your program by avoiding function call overheads. * It saves overhead of variables push/pop operations on the stack, when function calls happen. * It is possible to put a function definition in a header file, i.e. it can be included in multiple compilation unit, without the linker complaining. * When you inline a function, you may enable compiler to perform context specific optimization on the body of function. Such optimizations are not possible for normal function calls. Other optimizations can be obtained by considering the flows of calling context and the called context. * Inline function may be useful (if it is small) for embedded systems because inline can yield less code than the function call preamble and return. ### Disadvantages: * When used in a header, it makes your header file larger with information which users don’t care. * It increases the executable size due to code expansion. * C++ inlining is resolved at compile time. If you change the code of the inlined function, you would need to recompile all the code using it to make sure it will be updated. * Inline functions may not be useful for embedded systems when optimizing for memory (versus speed). </ins> * Inline functions might cause thrashing because inlining might increase size of the binary executable file. Thrashing in memory causes performance of computer to degrade. <ins> * The added variables from expanding the inlined function consumes additional registers potentially causing an overhead on register utilization if the number of variables increases drastically. * Too much inlining can also reduce your instruction cache hit rate, thus reducing the speed of instruction fetch from that of cache memory to that of primary memory. </ins> The following program demonstrates this concept: ```cpp


Question:
<!-- NOTE: If you're reporting a security issue, don't create a GitHub issue. Instead, email We will look into it immediately. --Describe your problem and how to reproduce it: this needs more work, but to begin a process - adding the proper acronym explanation (which is almost 50% of understanding the topic) and reducing misinformation about identifiers. also some explanation on the benefit of using this tool compared to its predecessor also adding basic usage and giving some more basic understanding of this tool Add a Link to the page with the problem:
I created a pull request for adding some basic information. Still need to correct the misinformation about identifiers.

--- <del> title: Bash ssh </del> <ins> title: Bash ssh (Secure SHell) </ins> --- ## Bash command: ssh <del> This command is used **to connect to a remote computer**, for example `ssh 123.456.789.012` will try to establish a connection with that host. The address of the remote computer can be provided using an IP address or, if provided, an identifier. </del> <ins> **Used to securly connect to a remote server** using Diffie-Hellman algorythm for key exchange, ssh replaces the archaic telnet program for remote shell sessions. </ins> <del> If the remote computer requires the user to login, they can use the form `ssh username@remote_address`, which will then prompt them for the user password on a successful connection. </del> <ins> for example `ssh 192.0.2.1` will try to establish a connection with that host. The address of the remote computer can be provided using an IP address resolvable hostname or FQDN. </ins> <del> It also has command line options which can be found on the SSH website. </del> <ins> If you wish to use a different username then the one initiating the session (i.e. you're using ssh from root but wish to log in as different user to a remote system), the form `ssh username@remote_address` can be used, which will then prompt for the user password on successful connection. </ins> <del> One thing to note, if the server is configured to listen to any port other than `22`, then you have to use `-p` option to specify the port. For example: `ssh -p 2024 123.456.789.012`. If the remote computer requires user login, the form `ssh username@remote_address` can be used, which will then prompt for the user password on successful connection. </del> <ins> Basic usage arguments: - `-p` - use a different port then configured in ssh_config file (usually 22) - `-u` - pass username outside of hostname URI - `-i` - use a different location for private key </ins> ### More Information: * [Wikipedia](https://en.wikipedia.org/wiki/Secure_Shell)


Question:
<!-- NOTE: If you're reporting a security issue, don't create a GitHub issue. Instead, email We will look into it immediately. --Describe your problem and how to reproduce it: this needs more work, but to begin a process - adding the proper acronym explanation (which is almost 50% of understanding the topic) and reducing misinformation about identifiers. also some explanation on the benefit of using this tool compared to its predecessor also adding basic usage and giving some more basic understanding of this tool Add a Link to the page with the problem:
I created a pull request for adding some basic information. Still need to correct the misinformation about identifiers.

## Bash command: ssh <del> **Used to securly connect to a remote server** using Diffie-Hellman algorythm for key exchange, ssh replaces the archaic telnet program for remote shell sessions. </del> <ins> **Used to connect to a remote computer** It's full form is 'Secure Shell'. It's purpose is to connect to another remote computer using tcp. The address of the remote computer can be provided using an IP address or, if provided, an identifier. </ins> <del> for example `ssh 192.0.2.1` will try to establish a connection with that host. The address of the remote computer can be provided using an IP address resolvable hostname or FQDN. </del> <ins> If the remote computer requires user login, the form `ssh username@remote_address` can be used, which will then prompt for the user password on successful connection. Example command: `ssh pi@192.168.0.101` This will connect to the computer in the local ip address of 192.168.0.101 and log in with the username pi. Another way to use this command is to pipe a command directly to it. For example: To execute the command `ls /tmp/doc` on the computer with ip address 192.168.0.101, type the following command at a shell prompt: `ssh 192.168.0.101  ls /tmp/doc` After authenticating to the remote server, the contents of the remote directory will be displayed, and you will return to your local shell prompt. </ins> If you wish to use a different username then the one initiating the session (i.e. you're using ssh from root but wish to log in as different user to a remote system), the form `ssh username@remote_address` can be used, which will then prompt for the user password on successful connection.


Question:
Tests run with the error: "assignment to undeclared variable currentNode". It happens because a variable "currentNode" is not declared in the method in the challenge code (not in the student code). Link: Steps to reproduce: the challenge. the button "Run the Tests". The challenge code: = function(element){ var node = new Node(element); if(head === null){ head = node; } else { currentNode = head; ...
Closing this issue, because it was fixed by PR
perhaps there was a regression. This bug is still present. Visit the link above and click 'Run the Tests'. You will see I did a hard refresh in two browsers to be sure. I also, checked the master branch. And it appears the code is fixed there. Is this something that is still waiting for a release?

function LinkedList() { var length = 0; var head = null; <ins> var currentNode = null; </ins> var Node = function(element){ this.element = element; this.next = null;


Question:
<!-- NOTE: If you're reporting a security issue, don't create a GitHub issue. Instead, email We will look into it immediately. --Describe your problem and how to reproduce it: This challenge has an example of sorting like this: ` This example uses a bad compare function. In recent changes to Chrome the following example no longer properly sorts the array: The compare function needs to return a number to be able to sort an array properly. This can be fixed by changing the compare function to return a number: Add a Link to the page with the problem: Tell us about your browser and operating system: Browser Name: Chrome Browser Version: 70 Operating System: Windows 10
The above return statement only returns 1 or -1. To preserve the original order for elements which have the same value, you need to test for the condition where they are equal. For example, to preserve an elements original order when equal, you would write: While in this particular example, you may not be able to see the difference, I will show a different example below, where the difference can be seen. Let's say you have the following array of objects: The 2nd and fifth elements have the same letter, but they are in different positions. Let's say you want to sort the objects in alphabetical order and preserve the original sort order of the elements with the same letter (in this case those with letter 'b'). This means, after the sort, letters should look like: If you just create the following sort function without specifying a return value of 0 when the letters are equal, it would not sort correctly in the new version of Chrome: The above produces: instead of the correct version: To preserve the original sort order for objects with the same letter, you must use the following sort function: I think the example should reflect the better practice of specifying a return value of 0 for elements which are equal in value. This matches the actual requirements of the compare function of returning a value of 0, -1, or 1, so I believe the example should be written like:
I am interested working on this issue
Although the example used in the original text doesn't require ordering I agree adding would be fine. As much as I like ternaries, I'm not in favor of nested ternaries. As a general rule they . If possible I'd keep the text challenge clean and readable. Maybe the good ol' if statements are fine here:
Let's see what says after my last reply, before we assign it to you.
Yeah, even I think it is better to make it in the form of as many people still get confused with nested ternaries.
I would take a different perspective here. For the purposes of the tutorial, I suggest that nested ternaries are the way to go. If people do get confused, this will encourage them to look up their doubt and they will be better versed with ternaries for later. I have opened a PR with the edit implementing nested ternaries.
On second thought, and the fact we already have a nested ternary lesson in basic JS section. I think it's fine to use a nested ternary. Good point as well.
Make sure to reference that it closes this issue # if you have not already done so.
just remember to ask first before you create a PR as there might be other people waiting to do one, like had asked here before if he could work on it? sorry about not getting to do a PR for this issue, there are other issues you might take a look at.
I will take care of this in future PRs. Apologies for my mistake .
Comment on issue
What are these PRs you have referenced?
could be spam.
The sample code on the FCC website is still the old version. I noticed on the challenge's GitHub page the sample code is different than what I saw on the live FCC website. I did this challenge on December 19, 2018. The sample code on the FCC website website is the old version (different from the GitHub version). I thought that the GitHub version of the challenge was reflected on the FCC site. Does this happen at regular intervals, or do updated challenges need to be pushed live to the site? As a side note, the sample code on the GitHub page and the live FCC site doesn't work in Chrome 70+ for reasons addressed above. May I update the sample code to a version that works? In this case, the description would also need updating to explain the code. Should I make the changes as a pull request? Sorry, I'm really new to FCC and Open Source contributing in general. I just want to make sure I do things in the most efficient way. I propose the following (the opposite of the reverse alphabetical sort suggested above): The old version that doesn't work in Chrome 70+: Here's the screenshot: ! Here is the link to the GitHub page:
Not sure if I misunderstood you, by "sample code" do you mean the guide? is a PR for the guide, although it seems to be missing the fix for reverseAlpha ascendingOrder version of sort where the compare function is using subtraction is only (to be) used with numbers, not strings. Which is not explained, nor is the function name very explicit about that fact. On a side note: Personally, I would like to see the use of parentheses as I feel it makes the nested ternary more legible. Maybe also a version using (maybe just in the guide) I would also like to see a link to the MDN docs (and maybe a short explanation of how the method and callback works).
RE: Sort an Array Alphabetically using the sort Method Challenge... Maybe not the cleanest but simply running this code: worked in my case :)
Hi I was not referring to the guide, but instead to the live/production and the GitHub version. (Now that you mentioned it, I checked out the PR you linked and noticed that even in the guide, the first example for an ascending sort does not work in Chrome 70+. I'll comment on that PR as well.) Here are screenshots and tables below summarizing the issue. In short, the sample code on the FCC site for ascending sort is an example of how to sort numbers. It works for numbers but does not work when applied to letters/strings in Chrome 70+. The sample code for the reverse alphabetical sort also doesn't work in Chrome 70+ but does in FireFox. I think it would be best to have sample code that applies to the challenge, and works across major browsers. ! ! PASS PASS PASS PASS Note: there is a typo in the second sample code block of the GitHub version screenshot. The PR you linked addresses that as well. Hope this info helps. Please let me know if anything is unclear.
Hi I like the brackets in the nested ternary. This may be minor, but I think a different arrangement of the nested ternary would be even more intuitive and brackets wouldn't really be necessary. I my suggestions as comments to the code blocks below. They match the code on the MDN page, which states that the ternary operator is right-associative (details below). What do you think? MDN: Conditional (ternary) operator
The TLDR; The only bug is, Chrome used to accept boolean return values like Firefox still does. After Chrome changed their sort it no longer does. This is not a bug in Chrome, but incorrect usage of the compare function in the assignment text, this has now been fixed (site is not updated yet). The comparefn is supposed to return numeric values: 0 (a must be equal to b) 1 (a is greater than b by the ordering criterion) -1 (a is less than b by some ordering criterion) If the comparefn does not return numeric values it is not consistent and the sort order is implementation-defined (which is spec compliant). ascendingOrder (return a - b) version is not meant to work with strings, in any browser. It is an example of using a compare function for sorting an array of numbers using subtraction. You seem to be mixing the number (ascendingOrder) and string versions (alphabeticalOrder/reverseAlpha), not sure why. Your screenshot and table are confusing and as far as I can tell must be wrong. The screenshot shows Chrome failing to sort an array of numbers, using ascendingOrder, which is incorrect. Then your table shows Firefox passing on an array of strings, using ascendingOrder, which it does not. For both browsers, using ascendingOrder on an array of numbers sorts the array correctly. Using ascendingOrder in Chrome on an array of strings leaves the array unchanged. Using ascendingOrder in Firefox on an array of strings reverses the array but does not sort it. Just to be clear, ascendingOrder is meant to sort the array, not reverse it. It just happens to be shown in the example text on an array of numbers that is in reverse order and so sorting the array effectively reverses it. can't put the alphabeticalOrder version in the assignment text, that is the solution to the assignment. That is why I asked. deeply nested ternaries your last style example is pretty common, however, for what we have in the assignment I think a single line expression is better. My format suggestion is based on how prettier formats the code. Last I'm not sure if this conversation on a closed issue is considered proper etiquette or not, I simply don't have enough experience.
The above analysis is spot on. Thank you for the great explanation and its fine to have a discussion in a closed issue as long as its on topic. Otherwise you can always create new issue.
function alphabeticalOrder(arr) { return ((a, b) =a !== b ? (a < b ? -1 : 1) : 0); }

 The sort method sorts the elements of an array according to the callback function. For example:
function ascendingOrder(arr) {
  return arr.sort(function(a, b) {
    return a - b;
  });
}
ascendingOrder([1, 5, 2, 3, 4]);
// Returns [1, 2, 3, 4, 5]

function reverseAlpha(arr) {
  return arr.sort(function(a, b) {
    return a < b;
  });
}
reverseAlpha(['l', 'h', 'z', 'b', 's']);
// Returns ['z', 's', 'l', 'h', 'b']

function ascendingOrder(arr) {
  return arr.sort(function(a, b) {
    return a - b;
  });
}
ascendingOrder([1, 5, 2, 3, 4]);
// Returns [1, 2, 3, 4, 5]

function reverseAlpha(arr) {
  return arr.sort(function(a, b) {
    return a === b ? 0 : a < b ? : 1 : -1;
  });
}
reverseAlpha(['l', 'h', 'z', 'b', 's']);
// Returns ['z', 's', 'l', 'h', 'b']
  Note: It's encouraged to provide a callback function to specify how to sort the array items. JavaScript's default sorting method is by string Unicode point value, which may return unexpected results.


Question:
Navbar is not proper align in the curriculum page as compared to other pages. There is a white line coming below the navbar. ! ! <!-- NOTE: If you're reporting a security issue, don't create a GitHub issue. Instead, email We will look into it immediately. --Browser Name: chrome Browser Version: 70.0.3538.67 (Official Build) (64-bit) Operating System: Ubuntu 18.04 LTS
I'll work on this
Have you gotten around?
Noup. Actually, when I ran the master branch locally, the bug was not there anymore.
Actually I'm able to see it. I can work on this!
That could be the offsetPlease check the relevant styles

} } .default-layout { <del> margin-top: 38px; } </del> <ins> margin-top: 34px; } </ins>  No newline at end of file


Question:
Describe your problem and how to reproduce it: The last test for this challenge needs additional time. I'm using optimized version of Sieve of Eratosthenes algorithm but the last case still times out: Here's the link to the code. The solution provided in the challenge's doesnt even pass the third test. I believe the tests are set to timeout after 100ms, if it could be increased to 200ms or 300ms, it should be doable. Add a Link to the page with the problem: Tell us about your browser and operating system: Browser Name: Chrome Browser Version: 70 Operating System: Windows 10 If possible, add a screenshot here (you can drag and drop, png, jpg, gif, etc. in this box):
It is caused by babel transform with loop-protect, which is set to 100 ms. Test timeout is set to 5 sec. Will you make a PR to replace a solution in the curriculum? It'll decrease the time of testing in Travis/CI. And in your solution at line 12 is not needed.
Thanks for replying. I'll make a PR updating the solution in curriculum and you're right line 12 is not required, I was trying to optimize the solution more by making the loop skip if that value is already but theres no point since accessing and assigning a value to an array is of anyway. I understand that it'll decrease the CI testing time. But updating the solution in curriculum would also update the test timeout for this challenge? Or something else would also need to be updated? Sorry, just trying to understand. Another quick question: Does the solution only needs to be updated in ? Or all languages? I'll make a PR for english folder but if it needs to be in all others too, let me know.
Update solution does not solve the problem with the test timeout. In addition, we have non-optimal solutions for problems 35 and 47.
Update solution does not solve the problem with the test timeout. Thats what I assumed too. How'd the timeout problem be solved? In addition, we have non-optimal solutions for problems 35 and 47. I'll update the PR with optimal solution of those.
need to increase this timeout:
I reckon changing that would increase for all challenges? If so, is there a way to only increase for this challenge or others (presuming we find more challenges that require it)?
Problem 35 have 3 wrong assertion tests. I've created a new solution for Problem 35 (current one is wrong) and optimized 47 solution to be 4x times faster. However we'd still need to add additional time. Since the inputs are quite big in both challenges. Shall I update the PR to add correct test and solution for 35 and optimized solution for 47?
Let's do it in separate PRs

</div> </section> ## Solution <section id='solution'> ```js //noprotect function primeSummation(n) { <del> // Initialise an array containing only prime numbers let primes = [2]; let result = 2; function isPrime(y, primes) { // Find sqrt(y) const sqrt = Math.floor(Math.sqrt(y)); // Divide y by each applicable prime, return false if any of them divide y for (let i = 0; i < primes.length && primes[i] <= sqrt; i++) { if (y % primes[i] === 0) { return false; } } // At this point x must be prime return true; </del> <ins> if (n < 3) { return 0 }; let nums = [0, 0, 2]; for (let i = 3; i < n; i += 2){ nums.push(i); nums.push(0); </ins> } <del> // For every odd integer, add it to the array if it is prime for (let x = 3; x < n; x += 2) { if (isPrime(x, primes)) { if (x > n) { return result; } else { result += x; primes.push(x); </del> <ins> let sum = 2; for (let i = 3; i < n; i += 2){ if (nums[i] !== 0){ sum += nums[i]; for (let j = i*i; j < n; j += i){ nums[j] = 0; </ins> } } } <del> return result; </del> <ins> return sum; </ins> } ```


Question:
The 3 example links for properly named titles under Title Section in style guide for guide articles are broken. click on this link to get to the issue
May I take this one?

## Quick references articles  1. How to work on Guide articles. 2. How to work on Coding Challenges. 3. How to setup freeCodeCamp locally. 4. How to catch outgoing emails locally.   1. How to work on Guide articles.
 2. How to work on Coding Challenges.
 3. How to setup freeCodeCamp locally.
 4. How to catch outgoing emails locally.  ## Style guides  1. Style guide for creating guide articles. 2. Style guide for creating coding challenges.   1. Style guide for creating guide articles.
 2. Style guide for creating coding challenges.  ## Quick commands reference when working locally


Question:
<!-- NOTE: If you're reporting a security issue, don't create a GitHub issue. Instead, email We will look into it immediately. --Describe your problem and how to reproduce it: There are many broken image links and the Visual Studio Code icon is way too large. Add a Link to the page with the problem: Tell us about your browser and operating system: Browser Name: n/a Browser Version: n/a Operating System: n/a If possible, add a screenshot here (you can drag and drop, png, jpg, gif, etc. in this box): !
I can work on this.
I can work on this.
has already submitted a PR which will most likely be accepted to resolve this issue. We have a backlog of PRs, so it will be a while before it gets merged. There is no need to create any additional PRs for this issue at this time. PRs are merged in the order they are received. Thank you.

title: Source Code Editors --- <del> ##Source Code Editors </del> <ins> ## Source Code Editors </ins> Source code editors are the programs that allow for code creation and editing. Any text editor can be used to write code. But dedicated code

right for you. The following editors are all cross-platform and free to use or evaluate.  ## Sublime Text ![Sublime Text Icon](//discourse-user-assets.s3.amazonaws.com/original/2X/1/1249e18855b9c9ef177e636e6c4e308b4877bf2d.png)   ## Sublime Text   ![Sublime Text Screenshot](//discourse-user-assets.s3.amazonaws.com/original/2X/6/63f774c31a7b1a439bcef9d11e95463b6998310e.png)   ![Sublime Text Screenshot](https://i.imgur.com/Jk2aJod.png)  Sublime Text is a very popular editor that has been around since 2008. There are many options and extensions available,

(The license for continued use costs $70. However, Sublime Text is free to download and evaluate, with a nag-screen pop-up.)  ## Brackets ![Brackets Icon](//discourse-user-assets.s3.amazonaws.com/original/2X/d/df30640741461569071875cf4ff6cad9924f8b32.png)   ## Brackets   ![Brackets Screenshot](//discourse-user-assets.s3.amazonaws.com/original/2X/2/2f395a58d24ed551ed8440a10ae640777f1143b6.png)   ![Brackets Screenshot](https://i.imgur.com/H9mO8qS.jpg)  Brackets is a relatively new open-source editor by Adobe. It is very user friendly, especially for people who aren't used to command-line interfaces or JSON-style settings/prefereces. Extensions and themes are quick and easy to find and install through the Extension Manager.  ## Atom ![Atom Icon](//discourse-user-assets.s3.amazonaws.com/original/2X/7/7f6ba67d0ea310e1c1024f83c9acc1e0ecf255a8.png)   ## Atom   ![Atom Screenshot](//discourse-user-assets.s3.amazonaws.com/original/2X/8/8016e7c0937e8ce6fcb6104c9aee0026443912f5.png)   ![Atom Screenshot](https://i.imgur.com/halOgkj.png)  Atom is an open source editor, developed by GitHub. Like Sublime Text, Atom is quite popular.

availble online.  ## Visual Studio Code ![Visual Studio Code Icon](https://i.imgur.com/b4vFsKa.png)   ## Visual Studio Code  ![Visual Studio Code Screenshot](https://code.visualstudio.com/home/home-screenshot-mac-lg.png)


Question: Describe the bug Several warnings in the Travis CI builds: To Reproduce Steps to reproduce the behavior: a PR the output in Travis CI build Expected behavior Cleaner builds; maybe reduce build time(?) Screenshots ! Additional context Error references this documentation: Live Demo in doc:

<del> const assert = require('chai').assert; </del> <ins> const { assert, AssertionError } = require('chai'); const Mocha = require('mocha'); </ins> const { flatten } = require('lodash'); const path = require('path');

const { LOCALE: lang = 'english' } = process.env; <ins> const oldRunnerFail = Mocha.Runner.prototype.fail; Mocha.Runner.prototype.fail = function(test, err) { // Don't show stacktrace for assertion errors. if (err.stack && err instanceof AssertionError) { delete err.stack; } return oldRunnerFail.call(this, test, err); }; </ins> let mongoIds = new MongoIds(); let challengeTitles = new ChallengeTitles();

} it('Test suite must fail on the initial contents', async function() { <ins> // suppress errors in the console. const oldConsoleError = console.error; console.error = () => {}; </ins> let fails = ( await Promise.all(tests.map(async function(test) { try {

return true; } }))).some(v => v); <ins> console.error = oldConsoleError; </ins> assert(fails, 'Test suit does not fail on the initial contents'); });


Question:
<!-- NOTE: If you're reporting a security issue, don't create a GitHub issue. Instead, email We will look into it immediately. --Describe your problem and how to reproduce it: In a hint for conditional operator shown an invalid solution. Add a Link to the page with the problem: Tell us about your browser and operating system: Browser Name: Google Chrome Browser Version: 70.0.3538.102 (64-bit) Operating System: Windows 10 Home for one language, 64-bit If possible, add a screenshot here (you can drag and drop, png, jpg, gif, etc. in this box): ! There is an assignment operator instead of the equality operator
This was fixed in PR it would soon be pushed to production. I'm fixing the formatting of the file.
As stated above, this has been resolved, but until the changes have been pushed to production, it will still show. Due to it being fixed, I am closing this issue. Thank you.
Hi, Sorry to get back to you on this topic but it seems that the invalid solution is still showing up : [] I am still having an assignment operator instead of the equality one - which works fine. Thank you.
the changes have not been pushed to production yet. The changes will appear once the repository is pushed to production
Ok, thanks.

--- title: Use the Conditional (Ternary) Operator --- <ins> ![:triangular_flag_on_post:](https://forum.freecodecamp.com/images/emoji/emoji_one/triangular_flag_on_post.png?v=3 ":triangular_flag_on_post:") Remember to use <a>**`Read-Search-Ask`**</a> if you get stuck. Try to pair program ![:busts_in_silhouette:](https://forum.freecodecamp.com/images/emoji/emoji_one/busts_in_silhouette.png?v=3 ":busts_in_silhouette:") and write your own code ![:pencil:](https://forum.freecodecamp.com/images/emoji/emoji_one/pencil.png?v=3 ":pencil:") </ins> ## Use the Conditional (Ternary) Operator <del> ### Problem explanation: _Use the `conditional operator` in the `checkEqual` function to check if two numbers are equal or not. The function should return either true or false._ </del> <ins> ### ![:checkered_flag:](https://forum.freecodecamp.com/images/emoji/emoji_one/checkered_flag.png?v=3 ":checkered_flag:") Problem Explanation: * You need to write a function named `checkEqual`, which checks if the two parameters are equal. * If the parameters are equal, `true` is to be returned else `false` should be returned. ## ![:speech_balloon:](https://forum.freecodecamp.com/images/emoji/emoji_one/speech_balloon.png?v=3 ":speech_balloon:") Hint Use ternary operator to check for equality. </ins> <del> #### Hint 1 Remember that the "traditional" `if...else` syntax can be re-written using the conditional operator (`condition ? statement if true : statement if false;`) </del> > _try to solve the problem now_ <del> > </del> <ins> ## Spoiler Alert! </ins> <del> ## Spoiler alert! </del> <ins> ![warning sign](//discourse-user-assets.s3.amazonaws.com/original/2X/2/2d6c412a50797771301e7ceabd554cef4edcd74d.gif) </ins> **Solution ahead!** <del> ## Code solution: </del> ```javascript function checkEqual(a, b) { return a === b ? true : false; } ``` <del> ·  Run code at [repl.it](https://repl.it/@AdrianSkar/Basic-JS-Ternary-operator). ### Code explanation - The function checks if the `condition` before the interrogation sign (`?`) is true, and if so, executes the `true` statement. Otherwise, it returns `false`. ### Resources - ["Conditional (ternary) operator" - *MDN JavaScript reference*](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator) </del> <ins> ### Code Explanation: * A function `checkEqual` is declared, it accepts two parameters in variables `a` and `b`. * The `return` statement would return the value of the evaluated ternary expression. * The ternary expression checks if `a` and `b` are equal or not and returns `true` or `false` respectively. </ins>


Question:
redirects to the wrong Guide article URL, causing a 404.
I would like to do this. Can you assign this to me?
Sure - thanks for volunteering to tackle this. Yes - please keep me posted on your progress :)
It is the 'Get a hint' button on the page. Probably needs a stub to avoid the 404.
is contributing to the guide a thing too? adding a stub here: should help. More challenging: write the guide :)
Yes - we would welcome your contributions to the guide.
Is the issue sorted or can I work on this ?
The problem is settled here:
Is this the same as this issue: ?

<ins> --- title: Improve Compatibility with Browser Fallbacks --- ## Improve Compatibility with Browser Fallbacks <!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds  --> We need to add a fallback to the ```background``` property of the ```.black-box`` class. ### Example ```css :root { --black-color: black; } .black-box { background: var(--black-color); width: 100px; height: 100px; } ``` ## Solution Add a fallback to the ```background``` property before the existing background declaration: ```css :root { --black-color: black; } .black-box { background: black; background: var(--black-color); width: 100px; height: 100px; } ``` </ins>


Question:
<!-- NOTE: If you're reporting a security issue, don't create a GitHub issue. Instead, email We will look into it immediately. --Describe your problem and how to reproduce it: The challenge wants the user to do a ("Hello World"); which sounds simple enough but it doesn't specify that it has to be in the but it eventually does with the error "hello world is not in the " or a similar error but when you go to the you see this: /* PLEASE DO NOT EDIT THIS FILE the verification process may break / It's jarring for someone who doesn't know about this language or system yet. I suggest changing "file" into "file section" or "section of the file" just to prevent confusion. As one material (the challenge page) is telling me to edit the file while the other material (the glitch material) is telling me NOT to edit the file. Add a Link to the page with the problem: Tell us about your browser and operating system: Browser Name: Browser Version: Operating System: If possible, add a screenshot here (you can drag and drop, png, jpg, gif, etc. in this box):**
I agree, we can clarify the instructions to something like: To get started, just print the classic "Hello World" in the console. You need to modify the file. The file shouldnt be modified at all. There is in which you can add and the latter challenges code.
Can I take this issue?
If I remember correctly, that's what I did first. I did the on the and it gave me the error of "log isn't in the server"(paraphrased). Just to clarify that that's what happened. If you mean that the challenge should instead change so that it's the that should be manipulated, then I think that's better.
Sure! I'm still very new and inexperienced so I leave it to your more capable hands! 8D
I have started course and in my Glitch app there is no file, also putting console log in is also not working
You need to use the boilerplate project mentioned in the introduction challenge.
Okay just to make it clear... First I cloned the Github boilerplate-express-gomix template... I'm not a big fan of Glitch... So if I have a project on Github at similar URL then logically file would be located at Now my question is pretty simple... JUST WHICH EXACT URL should I use in this case... this is a bit confusing... I managed to pass the whole previous Managing Packages with Npm section, still I had a bit of of hard time finding the proper URL to point to I found the main way to make it work in my case was to select the file, then click on Raw button. That would give me a similar URL which I later passed in the URL. Any hint on how to make the boilerplate project URL work with Github Thank you...
I think this should be to the Hint: "Use the new Glitch link for this episode" See this forum posts:

## Instructions
  Modify the myApp.js file to log "Hello World" to the console.
 ## Tests


Question:
<!-- NOTE: If you're reporting a security issue, don't create a GitHub issue. Instead, email We will look into it immediately. --Describe your problem and how to reproduce it: is poorly describing splice function, one would expect call based on that, but real one is Add a Link to the page with the problem: Tell us about your browser and operating system: Browser Name: not applicable Browser Version: not applicable Operating System: not applicable If possible, add a screenshot here (you can drag and drop, png, jpg, gif, etc. in this box): hopefully not necessary
From what I've read in MDN's , it takes three parameters but the last parameter is variadic. Maybe we can reword the following if it's unclear for some:
So I think that "on addition to removing elements, we can use additional parameters, which represents one or more elements, to add them as well" would be better I am not experienced with that terminology, but it seems to me that is called with four parameters rather than three, but these four parameters are transformed into three.
So I think that "on addition to removing elements, we can use additional parameters, which represents one or more elements, to add them as well" would be better I am not experienced with that terminology, but it seems to me that is called with four parameters rather than three, but these four parameters are transformed into three. Also, describes its parameters as "start (...) deleteCount (...) item1, item2, ..." - rather than describing it as a function with three parameters.
Good points. I am not experienced as well and my understanding is probably wrong. Maybe someone with more experience about the terminology can chime in.
Good one! This is much clearer.
OK, I will submit PR (feel free to remind me to do that once is empty)
I think your wording is better. I checked GitHub and could not find where you have submitted a PR with this new verbiage. If anyone else would like to create a PR using wording above, that would be great! Thank you.
Unless I'm blind, didn't suggest a change, the quote he gave is directly from the challenge. I think he just suggested what part of the text might be changed. I think part of the problem is when you don't have a clear definition and understanding of the difference between a parameter and an argument. 1 parameter !== 1 argument. I also think using parameter and argument interchangeably, which is done all the time, can cause quite a bit of confusion to people when first learning. The third parameter takes a list as the argument: Maybe just add that, "a list of": You can still misunderstand it to mean an array. It really isn't until you see the prototype method signature (if the annotation used makes sense, otherwise it is just confusing), or better yet an example of the method being used that you can really understand it. Besides a change to the challenge text. I would also suggest the example given in the challenge be updated to add 2 hex colors, this would show the third parameter used as a list. Which is the required knowledge needed to pass the challenge.
Side note: I think the way the challenge example code was written is potentially harmful to people just starting out learning. It really muddies the water and gives a wrong impression of how objects and the splice method works. This is the example code: It is effectively is doing this, but in my opinion hides that fact by returning the array and by capturing the return.
I should have said suggestion is different, because the current challenge states: which is different from his suggestion: I still don't like here, they are placeholders. With the splice method any passed after the first two are the extra elements do be inserted by the splice. I am not sure how best to convey this without using the terminology, but since the challenge is about , we need to come up with something. Definitely think we need to refer to a list of arguments in the example you mention should be add and make it clear that a list is not an array which the current verbiage would almost indicate (third parameter), like it is a collection instead of just a listing of extra arguments.
It is definitely not additional parameters, it is one parameter accepting multiple arguments. Here is my first stab at it.
I like all but that last "Example usage". I think It makes the challenge unnecessarily long and you already have the best example above that part: Here is how you pass a list of values to the third parameter:
My example (or something simple like it) would be used instead of the example code given in the challenge. In my opinion, when first explaining a prototype method it should be simple and bare-bones. It should not have any complexity to it that is not needed. At least not in the first example given. I can appreciate the example tries to be less abstract and more real-world, but there is a number of problems with it. use of a second function. It just needlessly complicates the example, I don't think it is a good way to initially show how splice works. it is using the array. Passing the reference, then changing the original array only to return it and overwrite the original array anyway. Not good, in my opinion. it is using splice. It makes it look like the change to the array is local to the function and needs to be returned, when in fact that is not the case. is also another more subtle problem with the colorChange function. When passing a list to the third parameter of splice as a variable (newColor), how you need to pass the list changes. It does not work as you might expect from looking at the original code. Anyway, long story short, I suggest we simplify the code example. Side note: I think a deeper problem is how we seem to want the challenges to be "all-in-one". I truly believe starting super simple first and then in the next challenge, if deem necessary, giving a more complicated and "real-world" example, would be so much better. Sorry for the wall of text.
Sincere apologies if this is out of place, but I was rooting around for some places to make first contributions and came across this. Sometimes a lack of experience is the best form of insight, yes? So, that said, I think that lasjorg is right about this: Furthermore, I think the example change suggested by lasjorg is also much clearer and easier to process: I think that this example, paired with a clearer explanation of the material, would be sufficient. The other two examples lasjorg suggested become redundant in that case. The following would be enough to both explain the functionality of splice() being demonstrated and provide enough context to allow students to grasp its scope: Because the examples in the lesson description do not have proper code formatting (red text on a gray background, with no markup), I find that comments can be very distracting and confusing, since it adds the task of processing the location of the comment notation and the scope it covers (changing the size of the window or frame can change how many lines the comments reach). It's better, then, to be reserved in how much of the example box is utilized for comments, and conscious of their length. As such, I've attempted to minimize their footprint in the example, and opted for a block comment when the comment stands alone. Hope this is helpful somehow.
Thank you for your insight. We have dropped the ball on this one, but hopefully we can implement some kind of improvement in the near future. FYI - You will be happy to know that PR is an attempt to address the lack of code formatting which has plagued the challenges for quite a long time.
As a first time contributor I would be happy to assist in any way I can here.
We are still discussing exactly what needs to be done. Once we finalize the verbiage, we'll post here.
Hi All, first timer here. trying to understand what needs to be done. Request someone to let me know how to proceed further on this issue. Thanks in advance.
function htmlColorNames(arr) { // change code below this line (0, 2, "DarkSalmon", "BlanchedAlmond"); // change code above this line return arr; } // do not change code below this line (htmlColorNames(['DarkGoldenRod', 'WhiteSmoke', 'LavenderBlush', 'PaleTurqoise', 'FireBrick'])); use this code this going to help you ok if code runs then thumbs up follow to
<bI hope by using above code issue is solved </b<centerthank you then close this issue</center
Did you actually read the issue and what it pertains to? Do we have any final verdict on this? I like what came up with, do you have any objections?
yes i readed but () function can take more than two values if still this issue is not solved then ask
I also really like what came up with. It's clear, concise and focused on what you can do with .
or anybody else want to create a PR implementing what has proposed? We welcome such a PR.
Hi, beginner here. I am willing to make the changes proposed by .
Go for it!

## Description
  Remember in the last challenge we mentioned that splice() can take up to three parameters? Well, we can go one step further with splice() — in addition to removing elements, we can use that third parameter, which represents one or more elements, to add them as well. This can be incredibly useful for quickly switching out an element, or a set of elements, for another. For instance, let's say you're storing a color scheme for a set of DOM elements in an array, and want to dynamically change a color based on some action:   Remember in the last challenge we mentioned that splice() can take up to three parameters? Well, you can use the third parameter, comprised of one or more element(s), to add to the array. This can be incredibly useful for quickly switching out an element, or a set of elements, for another.  ```js <del> function colorChange(arr, index, newColor) { arr.splice(index, 1, newColor); return arr; } let colorScheme = ['#878787', '#a08794', '#bb7e8c', '#c9b6be', '#d1becf']; colorScheme = colorChange(colorScheme, 2, '#332327'); // we have removed '#bb7e8c' and added '#332327' in its place // colorScheme now equals ['#878787', '#a08794', '#332327', '#c9b6be', '#d1becf'] </del> <ins> const numbers = [10, 11, 12, 12, 15]; const startIndex = 3; const amountToDelete = 1; numbers.splice(startIndex, amountToDelete, 13, 14); // the second entry of 12 is removed, and we add 13 and 14 at the same index console.log(numbers); // returns [ 10, 11, 12, 13, 14, 15 ] </ins> ```  This function takes an array of hex values, an index at which to remove an element, and the new color to replace the removed element with. The return value is an array containing a newly modified color scheme! While this example is a bit oversimplified, we can see the value that utilizing splice() to its maximum potential can have.   Here we begin with an array of numbers. We then pass the following to splice(). The index at which to begin deleting elements (3), the number of elements to be deleted (1), and the elements (13, 14) to be inserted at that same index. Note that there can be any number of elements (separated by commas) following amountToDelete, each of which gets inserted.
 ## Instructions


Question:
<!-- NOTE: If you're reporting a security issue, don't create a GitHub issue. Instead, email We will look into it immediately. --Issue Description Following the given instructions. The test will fail for the border-stroke($val) { $val === light { border: 1px solid black; } if $val === medium { border: 3px solid black; } if $val === heavy { border: 6px solid black; } { border: none; } } The checkmark at the bottom left says: "Your mixin should have an statement to set the border to none." and it will pass if using "none" but not "no border" as suggested. My suggestion is to replace "no border" from the instructions with "none" Link to the page with the problem: browser and operating system: Browser Name: Chrome Browser Version: Version 71.0.3578.98 (Official Build) (64-bit) Operating System: MacOs Sierra Version 10.12.6
Are you still facing this problem because on my end the code is working fine?
Hi yes. I still have the same issue. Following the instructions, the last test doesnt pass ! If I put 'border: none' in the statement it passes !
I believe the instruction is little misleading. It should have been 'no border - none' instead of 'none - border' as border doesn't doesn't have a property called "no border" but does have a property called "none". I could change the description of it to reduce confusion. Please let me know if this clarifies your concern or if it is a completely different issue.
yes, it has clarified my issue. Thank you for your help.

 Sass中的@if指令对于测试特定情况很有用 - 它就像JavaScript中的if语句一样。
 @mixin make-bold（$ bool）{
 @if $ bool == true {
 font-weight：bold;
 }
 }
就像在JavaScript中一样， @else if和@else测试更多条件：
 @mixin text-effect（$ val）{
 @if $ val == danger {
红色;
 }
 @else if $ val == alert {
颜色：黄色;
 }
 @else if $ val == success {
颜色：绿色;
 }
 @else {
颜色：黑色;
 }
 }

 ## Instructions
创建一个名为border-stroke的mixin ，它接受一个参数$val 。 mixin应使用@if ， @else if和@else检查以下条件：
光 -  1px纯黑色
中等 -  3px纯黑色
重 -  6px纯黑色
没有 - 没有边界

创建一个名为border-stroke的mixin ，它接受一个参数$val 。 mixin应使用@if ， @else if和@else检查以下条件：
光 - 1px纯黑色
中等 - 3px纯黑色
重 - 6px纯黑色
 如果$val不是light，medium，或者heavy，则边框应该设置为none。
  ## Tests


Question:
<!-- NOTE: If you're reporting a security issue, don't create a GitHub issue. Instead, email We will look into it immediately. --Issue Description Following the given instructions. The test will fail for the border-stroke($val) { $val === light { border: 1px solid black; } if $val === medium { border: 3px solid black; } if $val === heavy { border: 6px solid black; } { border: none; } } The checkmark at the bottom left says: "Your mixin should have an statement to set the border to none." and it will pass if using "none" but not "no border" as suggested. My suggestion is to replace "no border" from the instructions with "none" Link to the page with the problem: browser and operating system: Browser Name: Chrome Browser Version: Version 71.0.3578.98 (Official Build) (64-bit) Operating System: MacOs Sierra Version 10.12.6
Are you still facing this problem because on my end the code is working fine?
Hi yes. I still have the same issue. Following the instructions, the last test doesnt pass ! If I put 'border: none' in the statement it passes !
I believe the instruction is little misleading. It should have been 'no border - none' instead of 'none - border' as border doesn't doesn't have a property called "no border" but does have a property called "none". I could change the description of it to reduce confusion. Please let me know if this clarifies your concern or if it is a completely different issue.
yes, it has clarified my issue. Thank you for your help.

 Директива @if в Sass полезна для проверки конкретного случая - она работает так же, как и оператор if в JavaScript.
 @mixin make-bold ($ bool) {
 @if $ bool == true {
 font-weight: bold;
 }
 }
 И так же, как в JavaScript, @else if и @else test для получения дополнительных условий:
 @mixin text-effect ($ val) {
 @if $ val == опасность {
 красный цвет;
 }
 @else, если $ val == alert {
 цвет: желтый;
 }
 @else, если $ val == success {
 цвет: зеленый;
 }
 @else {
 черный цвет;
 }
 }

 ## Instructions
 Создайте mixin называемый border-stroke который принимает параметр $val . mixin должен проверить следующие условия, используя @if , @else if и @else :
 свет - 1px сплошной черный
 средний - 3px сплошной черный
 тяжелый - 6px сплошной черный
 none - нет границы

 Создайте mixin называемый border-stroke который принимает параметр $val . mixin должен проверить следующие условия, используя @if , @else if и @else :
свет - 1px сплошной черный
средний - 3px сплошной черный
тяжелый - 6px сплошной черный
 Если $val не является light, medium, или heavy, для границы должно быть установлено значение none.
  ## Tests