- Run testem from this directory.
- Copy and paste the url into a browser.
- For each question, read the README, and then write your code in the .js file in each directory.
- Save your work to update the tests.
- cd to correct directory
- npm install
- npm test
obj.hasOwnProperty(key)
- 1: es3
for( let key in obj){
return obj[key]
}
- 2: ES5
let keys = Object.keys(obj1)
Object.keys(obj1).forEach(function (key) {
let val = obj1[key]
})
- 3: ES
for( const key of Object.keys(obj1)){
const val = obj1[key]
}
- 4: ES7
const values = Object.values(obj);
for( const value of Object.values(obj1)){
return vale
}
string.split("")
"hello" => [ 'h', 'e', 'l', 'l', 'o' ]