Skip to content

How to push value in empty array in TypeScript?

//you need to initialise it as empty first
let x: any[] = []
x.push("any value")
See also  Python code snippet - How to add decorators with class in django?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.