Adding client side logs into an Array
i want to add my client side logs in to an Array on client side only. The requirement is, right now using javascript i m writing client sid开发者_运维知识库e logs to log file on client side. My new requirement is i want to add my log statements to an Array & on click of one button, i want to open one window & want to show those logs in that window. My question is,what should be maximum limit for an Array in Javascript.so that once that limit is reached,i can clear all log statments from that array.
You can define an array in JavaScript without specifying the limit, JavaScript will take care if the size limit. Items can be removed using splice method of the array.
精彩评论