값이 없는 경우 HTML5 로컬 저장소 개체는 무엇을 반환합니까? (What does the HTML5 Local Storage object return if there is no value?)


문제 설명

값이 없는 경우 HTML5 로컬 저장소 개체는 무엇을 반환합니까? (What does the HTML5 Local Storage object return if there is no value?)

키/값 쌍이 이미 로컬 저장소 개체에 존재하는지 확인하는 함수를 작성할 때 무엇을 확인해야 합니까? 그러한 키/값 쌍이 없으면 null, 빈 객체, 다른 것을 반환합니까?


참조 솔루션

방법 1:

localStorage.getItem will return null for keys that are unset:

The getItem(key) method must return the current value associated with the given key. If the given key does not exist in the list associated with the object then this method must return null.

Source: https://html.spec.whatwg.org/multipage/webstorage.html#dom‑storage‑getitem

(by Peter David CarterWander Nauta)

참조 문서

  1. What does the HTML5 Local Storage object return if there is no value? (CC BY‑SA 2.5/3.0/4.0)

#graphics #geometry






관련 질문

Triangulate a quad with a hole in it using tessellation (Triangulate a quad with a hole in it using tessellation)

기존 이미지가 화면에 그려지지 않는 이유는 무엇입니까? (Why won't my existing image draw to the screen?)

barplot()에서 정보를 저장하고 그래프를 표시하지 않는 방법 (How to save information from barplot() and not displaying the graph)

Java 시간에 따라 사각형을 이동하는 방법 (java how to make a rectangle move by time)

큐브맵을 2D 텍스처로 투영 (Project cubemap to 2D texture)

OpenGL & Qt : 마우스 오버 시 레이블 표시 (OpenGL & Qt : display a label on the mouseover)

프리파스칼에서 기능적 그래픽을 얻으려면 어떻게 해야 합니까? (How do I get functional graphics from freepascal?)

스크래치 및 승리 (Scratch and win)

벡터 병합 알고리즘 도움말 (Help with algorithm for merging vectors)

WPF - ScreenSaver 그래픽 성능 향상 (WPF - ScreenSaver graphics performance improvements)

Java, 패널용 그래픽 개체 생성 및 편집? (Java, create and edit a Graphics Object for Panel?)

정점 셰이더의 out 변수는 어떻게 보간됩니까? (How are the out variables of vertex shader interpolated?)







코멘트