Javascript Logo

What does use strict do in javascript?

< 1 min readThe “use strict” directive is a way to opt in to a restricted variant of JavaScript. It enables strict mode, which is a way to write more secure and efficient code by eliminating certain syntax and behaviors that are potentially error-prone or confusing. When strict mode is enabled, JavaScript will throw more exceptions and will…

Read More

how to prevent SQL injection in php?

< 1 min readSQL injection is a security vulnerability that occurs when user-supplied input is not properly sanitized and is used to create dynamic SQL statements. To prevent SQL injection attacks in PHP, you can use prepared statements and parameterized queries. Prepared statements and parameterized queries are a way to send SQL queries to the database with placeholders…

Read More

How to append a file in Node JS?

< 1 min readTo append data to a file in Node.js, you can use the fs (file system) module and the fs.appendFile() function. The fs.appendFile() function takes a file path and a string or Buffer as arguments, and asynchronously writes the data to the end of the file. If the file does not exist, it will be created….

Read More