Skip to content

Instantly share code, notes, and snippets.

@xgqfrms-GitHub
Created November 16, 2016 08:37
Show Gist options
  • Save xgqfrms-GitHub/8b20b576edb8c9e74e6dfae2655c7077 to your computer and use it in GitHub Desktop.
Save xgqfrms-GitHub/8b20b576edb8c9e74e6dfae2655c7077 to your computer and use it in GitHub Desktop.

great post! but here still some little bugs!

# 1
<del>flightNumber.endsWith(jz)</del>
flightNumber.endsWith(`jz`)

# 2
<del>const accountnumber = '825242631RT0001';</del>

const accountNumber = '825242631RT0001';

# 3
<del> 
const make = 'BMW';
const model = 'x5'
const colour = 'Royal Blue';
</del>

const make = 'BMW';
const model = 'x5';
const colour = 'Royal Blue';

# 4
<del>
leftPad.repeat(str, length = 10){
    return `${' '.repeat(length - str.length)}${str}`;
}
</del>

let leftPad = (str, length = 10) => {
    return `${' '.repeat(length - str.length)}${str}`;
}

more details, see here: https://github.com/xgqfrms-GitHub/webgeeker/blob/gh-pages/ES6-tutorial/String/readme.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment