import React from 'react' import './End.css' import tr from './img/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 ( <>

채점표

{scores.map((score, index) => { return (score === 1) ? : })}
응시자 {localStorage.getItem('name')}
Quiz {index + 1} O
Quiz {index + 1} X
총점 {score}점
) } export default End;