json on javascript code example
Example 1: create a json object in javascript
var employee = {
"firstName": firstName,
"lastName": lastName
}
Example 2: create a javascript json object
const student = {
name: "bob",
age: 7,
grade: 6
}
var employee = {
"firstName": firstName,
"lastName": lastName
}
const student = {
name: "bob",
age: 7,
grade: 6
}