Sprawdzanie sesji w JavaScript

var user = sessionStorage.getItem("userId")
Thanush Wijesinghe