indexOf vs findIndex
const bookTitle = ['c#','javascript','수학의정석','토익','총균쇠','오만과편견']; const findIndex = bookTitle.indexOf('총균쇠'); console.log(findIndex); const books = [{name:'c#', price: 2000},{name:'javascript', price: 1000},{name:'수학의정석', price: 500},{name:'토익', price: 200},{name:'총균쇠', price: 1500}]; const bookFindIndex = books.findIndex((book) => book.name === 'c#'); console.log(bookFindIndex); indexOf : 원시타입의..