import React, { createContext } from 'react' import './End.css' import tr from './img/img_end.jpg'; // import { Link } from 'react-router-dom'; function End() { let a = [] for (let i = 0; i < 3; i++) { if (localStorage.getItem('답' + (i + 1)) === localStorage.getItem('정답' + (i + 1))) { a[i] = 1 localStorage.setItem('채점' + (i + 1), 'O') } else { a[i] = 0 localStorage.setItem('채점' + (i + 1), 'X') } } return ( <>
-채점표-

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

Quiz 1 : {localStorage.getItem('채점1')}

Quiz 2 : {localStorage.getItem('채점2')}

Quiz 3 : {localStorage.getItem('채점3')}

Total Score : {a[0] + a[1] + a[2]}

수고
) } export default End;