import React from 'react' import tr from './img_end.jpg'; // import { Link } from 'react-router-dom'; function End() { let scores = [] let score = 0 const answers = JSON.parse(localStorage.getItem('Answers')) const solutions = JSON.parse(localStorage.getItem('Solutions')) for (let i = 0; i < answers.length ; i++) { if (answers[i] === solutions[i]) { scores[i] = 1 } else { scores[i] = 0 } score += scores[i] } return ( <>
-채점표-

이름 : {localStorage.getItem('name')}

{scores.map((score, index) => { if (score === 1) { return

Quiz {index+1} : 'O'

} else { return

Quiz {index+1} : 'X'

} })}

Total Score : {score}

수고
) } export default End;