appending new text and cosole.log it
This commit is contained in:
parent
9cfe515df8
commit
93818a519c
1 changed files with 3 additions and 6 deletions
|
@ -1,5 +1,7 @@
|
||||||
import { User } from "./types";
|
import { User } from "./types";
|
||||||
|
|
||||||
|
const text = "This is the new text";
|
||||||
|
|
||||||
function getFromDb(): User[] {
|
function getFromDb(): User[] {
|
||||||
return [{
|
return [{
|
||||||
name: "kfir",
|
name: "kfir",
|
||||||
|
@ -9,9 +11,4 @@ function getFromDb(): User[] {
|
||||||
function sendError(error: string): void {
|
function sendError(error: string): void {
|
||||||
throw new Error(error);
|
throw new Error(error);
|
||||||
}
|
}
|
||||||
|
console.log(text);
|
||||||
|
|
||||||
const data = getFromDb();
|
|
||||||
const name = data[0].name;
|
|
||||||
const email = data[0].email;
|
|
||||||
console.log(data);
|
|
Reference in a new issue