Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                
              
            
!

CSS

              
                
              
            
!

JS

              
                /**
 * Use the Arrow Function rather than anonymous function, if you can
 */
// 1. Create an Array list containing the following as a literal object.
//title	              price	author	  rank
//----------------------------------------
//Three Little Pigs	  20	  Jacobs	  1
//Alice in Wonderland	25	  Carroll	  2
//Seven Dwarfs	      35	  Disney	  3
//Swallow's gift	    15	  Unknown 	4
let books = [
  {title: "Three Little Pigs", price: 20, author: "Jacobs", rank: 1},
  {title: "Alice in Wonderland", price: 25, author: "Carroll", rank: 2},
  {title: "Seven Dwarfs", price: 35, author: "Disney", rank: 3},
  {title: "Swallow's gift", price: 15, author: "Unknown", rank: 4},
];

let book = {title: "Cinderella", price: 30, author: "Perrault", rank: 5};

// 2. What is the type of books? Are there any Javascript types?


//3. Add a book object to the front of books array.


//4. Delete the book object you just added.


// 5. Add a book object to the end of books array


// 6. Delete the book object you just added.


// 7. Insert a book object between Alice in Wonderland and Seven Dwarfs.


// 8. Delete the book object you just added.


// 9. 제목이 Swallow's gift인 객체의 작가를 Unknown 에서 Tom 으로 변경하시오.
// 먼저 Swallow's gift 를 찾은 후에 이름을 변경하시오.


// 10. Sum all the price of books array.


// 11. rank가 3보다 적은 책들을 모은 새로운 배열을 리턴하시오.


// 12. After sorting the title first, create a new array with a rank number before a title
// the result is


// 13. 가장 비싼 책의 제목을 출력하시오.

              
            
!
999px

Console