This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function multiplicationTable(num) { | |
for (let i = 1; i <= 10; i++) { | |
const product = num * i; | |
console.log(`${num} x ${i} = ${product}`); | |
} | |
} | |
// Test the function with different input numbers | |
multiplicationTable(5); | |
multiplicationTable(7); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Question 1: | |
//You have a Laravel application with a form that submits user information using a POST request. Write the code to retrieve the 'name' input field value from the request and store it in a variable called $name. | |
//============================= | |
Route::post( '/submit', function ( Request $request ) { | |
// Retrieve the 'name' input field value from the request | |
$name = $request->input( 'name' ); |
OlderNewer