Copy edits (#35536)
* Copy edits to Basic JavaScript section * Copy edits to ES6 section * Update index.md
This commit is contained in:
		
				
					committed by
					
						
						The Coding Aviator
					
				
			
			
				
	
			
			
			
						parent
						
							768b618e68
						
					
				
				
					commit
					914a7c522d
				
			@@ -38,7 +38,7 @@ Change all the variables to `let` or `const` and rename `sentence`.
 | 
			
		||||
    function printManyTimes(str) {
 | 
			
		||||
      "use strict";
 | 
			
		||||
      const SENTENCE = str + " is cool!";
 | 
			
		||||
      for(let i = 0; i < str.length; i+=2) {
 | 
			
		||||
      for (let i = 0; i < str.length; i+=2) {
 | 
			
		||||
        console.log(SENTENCE);
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -31,7 +31,7 @@ _You need to freeze the `MATH_CONSTANTS` object so that no one is able to alter
 | 
			
		||||
      
 | 
			
		||||
      try {
 | 
			
		||||
        MATH_CONSTANTS.PI = 99;
 | 
			
		||||
      } catch( ex ) {
 | 
			
		||||
      } catch(ex) {
 | 
			
		||||
        console.log(ex);
 | 
			
		||||
      }
 | 
			
		||||
      return MATH_CONSTANTS.PI;
 | 
			
		||||
 
 | 
			
		||||
@@ -31,14 +31,14 @@ function makeClass() {
 | 
			
		||||
  "use strict";
 | 
			
		||||
  /* Alter code below this line */
 | 
			
		||||
  
 | 
			
		||||
  class Thermostat{
 | 
			
		||||
    constructor(fahrenheit){
 | 
			
		||||
  class Thermostat {
 | 
			
		||||
    constructor(fahrenheit) {
 | 
			
		||||
      this.fahrenheit = fahrenheit;
 | 
			
		||||
    }
 | 
			
		||||
    get temperature(){
 | 
			
		||||
    get temperature() {
 | 
			
		||||
      return 5 / 9 * (this.fahrenheit - 32);
 | 
			
		||||
    }
 | 
			
		||||
    set temperature(celsius){
 | 
			
		||||
    set temperature(celsius) {
 | 
			
		||||
      this.fahrenheit = celsius * 9.0 / 5 + 32;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
@@ -35,7 +35,7 @@ We need to compute and square values from the `realNumberArray` and store them i
 | 
			
		||||
```javascript
 | 
			
		||||
    const squareList = (arr) => {
 | 
			
		||||
      "use strict";
 | 
			
		||||
      const squaredIntegers = arr.filter( (num) => num > 0 && num % parseInt(num) === 0 ).map( (num) => Math.pow(num, 2) );
 | 
			
		||||
      const squaredIntegers = arr.filter((num) => num > 0 && num % parseInt(num) === 0).map((num) => Math.pow(num, 2));
 | 
			
		||||
      return squaredIntegers;
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user